Monday, February 27, 2012

Facebook Share (URL based)

This is the most simplest way to add a facebook share button.

Use the following code as the reference(href) attribute of your anchor tag(<a>)

"<text or url to post on wall>"

You can use any image to show the share button, but be precise in selecting it,

as the user should get on it easily.

Consider the following sample code:

<a href=""><img src="" alt="share on facebook"></a>

If you are developing any applicetion or website and want the post to be displayed as it was posted from your app,

like "via theChaithanya", use the following code:


On successful sharing it will redirect you to the redirect-url along with post-id.

Note: To get APP-ID, you have to register a developer account and create an app.

Also the redirect url should be added there in the app settings.

For further info visit: