This is basicly a wrapper extension for the jQuery socialshareprivacy Plugin developed by heise.de. It allows to include the typical 'I Like', 'Tweet' and '+1' Buttons from Facebook, Twitter and Google+ respectively.
Unlike the original scripts, this one requires the user to "switch on" the buttons before loading the external scripts from the mentioned providers, allowing the user to take control of their personal data and offer them a way to opt-out of data collection for advertising and other reasons.
Requirements ¶
Yii 1.1.5
Usage ¶
Using the extension is straightforward.
- Extract the Widget within your application (typically within the extension directory)
- Use the following code within your layout (or within a view) to show the bar.
$this->widget('ext.socialshareprivacy.SocialSharePrivacy', array(
// Options are directly passed to the plugin as JSON array
// See offical documentation for valid values (See below)
'options' => array(
'services' => array(
// Turn off the twitter button
'twitter' => array('status' => 'off'),
),
),
'htmlOptions' => array(
// Assign your own options if you want
// 'style' => 'width: 900px; margin: 0 auto;',
),
));
Example Preview (With twitter enabled):
With all buttons turned on the bar requires approximately 600px in width and 290px in height.
Facebook and Google Plus
I have applied this plug in and works fine only for the twitter , i can share my page on twitter but it not working for facebook and google plus. Here is the code I have used on my view page
<?php
$this->widget('ext.socialshareprivacy.SocialSharePrivacy', array(
// Options are directly passed to the plugin as JSON array // See offical documentation for valid values (See below) 'options' => array( 'services' => array( // Turn off the twitter button 'twitter' => array('status' => 'on'), 'facebook' => array('status' => 'on'), 'gplus' => array('status' => 'on'), ), ), 'htmlOptions' => array( // Assign your own options if you want // 'style' => 'width: 900px; margin: 0 auto;', ),
));
?>
Can any one tell me why the fshare and google share is not working. Is those are the limitations of this plug in.?
Need more informations
Hi shaik.
What exactly isn't working? Do you mean that the buttons for facebook and google are not displayed?
When i take your code it works perfectly for me.
In fact you can strip it down to the following equivalent form:
<?php $this->widget('ext.socialshareprivacy.SocialSharePrivacy'); ?>
Linked in Share
Ok. I have used this one Yii-social-sharing-widget-master and its working fine.
I used facebook, twitter and google plus, but is there any widget for linkedin share. Can you please pass me some links to share my site through linkedin website.I dint found any.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.