I want to do a simple facebook share button in Ruby on Rails app using koala gem.
The button should be very simple - like this
<a href="https://www.facebook.com/sharer/sharer.php?u=example.org" target="_blank">
Share on Facebook
</a>
I would like to click on it and then should be opened new browser window to put post on my wall (or login to facebook).
I'm beginner in koala gem so I don't know how to do this. Until know I add to controller show method
# part of object_controller.rb
def
@graph = Koala::Facebook::API.
end
and on the view
# part of show.html.erb
<%=graph.put_wall_post("hey, i'm learning koala")%>
but it wants the token access and I think that there is a better (simpler) solution.
Koala gem is a realy powerfull tool. If you want just add a share button use more simplest ways: a lot info about share buttons.
But if you want to do some specific just write about it, I will try to help you.