PHP code example of black-lamp / yii2-social-networks

1. Go to this page and download the library: Download black-lamp/yii2-social-networks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

black-lamp / yii2-social-networks example snippets


'components' => [
    // ...
    'socialNetworks' => [
        'class' => bl\socialNetworks\components\SocialNetworks::className(),
        'networks' => [
            'vk' => [
                'label' => 'VK',
                'link' => 'http://vk.com'
            ],
            'facebook' => [
                'label' => 'Facebook',
                'link' => 'https://facebook.com'
            ],
            'instagram' => [
                'label' => 'Instagram',
                'link' => 'https://instagram.com'
            ],
        ]
    ],
]

    <?= \bl\socialNetworks\SocialNetworks::widget([
        'componentId' => 'socialNetworks' // SocialNetworks component ID from application config
    ])