Widget that generates sharing buttons for facebook, twitter and google plus
Requirements ¶
Yii 1.1 or above
Installing ¶
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.
Usage ¶
$this->widget('path.to.SocialShareWidget', array(
'url' => 'http://example.org', //required
'services' => array('google', 'twitter'), //optional
'htmlOptions' => array('class' => 'someClass'), //optional
'popup' => false, //optional
));
Download ¶
https://github.com/pavlepredic/Yii-social-sharing-widget</a>
Demo would have been great
Thanks for the extension - a demo page would have been really nice :)
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'),
error:
Non-existant service: 'facebook,'
Demo
@sanguina
Here's a website that uses this widget:
http://www.popboks.com/article/9208
Scroll down until you spot social sharing icons (facebook, twitter, google).
@WebDevPT
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).
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 ?
social-share-button extension
Try this new extension -
http://www.yiiframework.com/extension/social-share-button/
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.