Social Media sharing Buttons in Ruby on Rails -


i'm trying add custom social media sharing buttons in blog app in ruby on rails. important me pop-up window show sharing "post" meaning want include javascript.

unfortunately code not work:

  <!-- twitter -->   <a oneclick="javascript:window.open('http://twitter.com/share?text=<%= @post.title %>    martin bortowski - &amp;url=<%= url_for([@post, {only_path: false}]) %>',   '_blank', 'width=800, height=500, top=200, left=300');void(0);"><i class="fa fa-twitter"></i></a>    <!-- facebook -->   <a oneclick="javascript:window.open('http://facebook.com/sharer.php?u=<%= url_for([@post, {only_path: false}]) %>',   '_blank', 'width=800, height=500, top=200, left=300');void(0);"><i class="fa fa-facebook"></i></a>    <!-- google plus -->   <a oneclick="javascript:window.open('https://plus.google.com/share?url=<%= url_for([@post, {only_path: false}]) %>',   '_blank', 'width=800, height=500, top=200, left=300');void(0);"><i class="fa fa-google-plus"></i></a> 

when click on button nothing happens. missing? can me please? if need further information let me know.

there number of gems available in ruby on rails implementing social shairing feature below few links

  1. https://github.com/huacnlee/social-share-button
  2. https://github.com/hermango/shareable

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -