Share parameter with facebook share button
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
fjs.parentNode.insertBefore( js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="col-xs-4 col-md-2"> <%= link_to "F Share","#",:id => "share_button"%>
<script type="text/javascript">
var talent_id = 1
$(document).on('click','# share_button',function(e){
e.preventDefault();
FB.ui(
{
method: 'feed',
link: '<%= root_url%>',
name: 'Your friend "your name" has shared a profile with you created ',
caption: 'Name: fdfdfdfd',
description: 'Skill Description: fdfdfdffdfdf',
actions: [
{ name: 'Join the SkillTreasure Community', link: 'http://SkillTreasure.com/' }
],
message: ''
});
});
</script>
Comments
Post a Comment