Created
February 22, 2011 16:44
-
-
Save Holek/838952 to your computer and use it in GitHub Desktop.
More instructions and examples for facebook_share gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
<%= facebook_share :name => "Some Fancy Title", | |
:picture => "http://pic.tu.re/of/awesomeness.png", | |
:description => "I am the awesome description of this page, how cool is that?" %> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(".fb_share").unbind("click.facebook_share").bind("click.facebook_share",function () { | |
FB.ui({method: 'stream.publish', | |
link: "http://link.to/current_site", | |
display: "popup", | |
name: "Some Fancy Title", | |
picture: "http://pic.tu.re/of/awesomeness.png", | |
description: "I am the awesome description of this page, how cool is that?" | |
}); | |
return false; | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// I'm using some unknown to facebook_share library, let's get fancy! | |
fb_share = ___myAwesomeLibrary.giveMe('#facebook_share_button'); | |
fb_share.want('click', function () { | |
<%= facebook_share_code :display => "iframe" %> | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// I'm using some unknown to facebook_share library, let's get fancy! | |
fb_share = ___myAwesomeLibrary.giveMe('#facebook_share_button'); | |
fb_share.want('click', function () { | |
FB.ui({method: 'stream.publish' | |
link: "http://link.to/current_site", | |
display: "iframe" | |
}); | |
return false; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment