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

Popular Posts

How to pass hash in Postman

nginx: unrecognized service

Bootstrap Select Picker append add new item if search not exist

Reading Excel Sheets using "Roo" gem in ruby on rails

Add CORS to Nginx on AWS Elastic Beanstalk

Enable gzip compression on Elastic Beanstalk with nginx

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

Get video duration by URL in Ruby on Rails

site-enables nginx setting in ruby in rails