Share on Facebook with Description

Recently one of my collegue was struglling with sharing information on Facebook using Sharer.php, earlier it was a good and easiest way to share or post on Facebook progrmatically. It used to take 2 arguments u & t:

http://www.facebook.com/sharer.php?u=http://yahoo.com&t=description_here
The u argument is the url that you are sharing.
The t argument should be the descriptive text that goes along with the post. However this is deprecated and no longer works.

Now if this is used it post, page title as description which is not desirable in most of cases.

I googled as well checked Open Graph meta tag (https://developers.facebook.com/docs/opengraph/), which same I also reviewed an article by Petisia showing same using meta tags but we need a separate PHP code file in this.

Finally after bit of study I was able to come up with an option which allow to post URL, description, image etc. to wall using single share file link:

http://www.facebook.com/sharer.php?s=100&p[title]=YOUR TITLE HERE;p[url]=YOUR URL HERE&p[images][0]=IMAGE PATH HERE&p[summary]=YOUR DESCRIPTION HERE”>

Click to view live demo

Above link will allow you to post a link with details on Facebook to this blog post

Deepak Sihag

Deepak is a Technical consultant, working on web since last 12 years. He excels in Microsoft .Net, OpenSource (mainly WordPress customization & plugin development) as well love working with CRM. He has been working with startups to listed companies and help them to build their online presence and reach target audience.

More Posts - Twitter - LinkedIn