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 - &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
Comments
Post a Comment