Sharing to Facebook
http://www.facebook.com/dialog/feed?app_id=123456789&link=http://Domain_name/<%= @post.id %>/<%= @post.name %>&picture=<%= @default_image_of_the_post.image_url %>&name=<%= @post.title %>&caption=<%= @post.caption %>&description=<%= @post.description %>&redirect_uri=http://Domain_name/<%= request.original_url %>&display=popup” target=’_blank’>
Note:
app_id = ‘App_Id’ which is given by facebook. U need to register your app in Facebook
check here ‘https://developers.facebook.com‘ go to Apps tab and click on ‘Create a New
App’
link = This is the link for this particular post, if any user clicks on this post in FB, he will be
redirected to this link
picture = Picture for the post
name = Title of the post
caption = Caption for the post
description = Description for the post
redirect_uri = after posting, To which link u want user to be redirected. Its better to give ‘request.original_url’, user will redirect to same page from where he has been sharing the link
Sharing to Linked in
http://www.linkedin.com/shareArticle?mini=true&url=http://Domain_name/<%= @post.id %>/<%= @post.name %>&title=<%= @post.title %>&summary=<%= @post. description %>” target=”_blank”>
Note:
url = This is the link for this particular post, if any user clicks on this post in Linked in, he will be
redirected to this link
Title = Title for the post
summary = Description for the post