Yii 1.1: social-sharing-widget

Widget that generates sharing buttons for facebook, twitter and google plus

Widget that generates sharing buttons for facebook, twitter and google plus


Yii 1.1 or above


Copy files to your project, eg. to protected/components/widgets. You should preserve the folder structure and make sure assets are placed in ./assets/socialshare. You may place assets to another directory, but make sure you specify the full path in 'assetsPath' property.


$this->widget('path.to.SocialShareWidget', array(
    'url' => 'http://example.org',          //required
    'services' => array('google', 'twitter'),   //optional
    'htmlOptions' => array('class' => 'someClass'), //optional
    'popup' => false,               //optional



Total 6 comments

#17822 report it
Rohit Suthar at 2014/07/25 05:55am
social-share-button extension
#13193 report it
gunnit at 2013/05/13 06:16am
How to link to the widget

i tried creating a folder under components and calling it widgets, but when i try to link to it i get the following error ; "alias is invalid" any idea ?

#12555 report it
pavlepredic at 2013/03/28 10:41am

You probably have a typo. Judging from the error message, I would guess that your 'services' config line actually reads:

'services' => array('facebook,','google', 'twitter'),

(note the extra comma).

#12554 report it
pavlepredic at 2013/03/28 10:33am

Here's a website that uses this widget:
Scroll down until you spot social sharing icons (facebook, twitter, google).

#12334 report it
WebDevPT at 2013/03/14 06:33am
Not working for facebook

This works well with g+ and twitter but does not work with facebook, at least for me with these settings:

'services' => array('facebook','google', 'twitter'),


Non-existant service: 'facebook,'
#12084 report it
sanguina at 2013/02/26 02:47pm
Demo would have been great

Thanks for the extension - a demo page would have been really nice :)

Leave a comment

Please to leave your comment.

Create extension
No downloadable files yet