Facebook share button: how to implement

paul smith picture paul smith · Nov 5, 2012 · Viewed 20.8k times · Source

I'm trying to figure out how to implement the Share button exactly as how it is implemented here. I want the ability to let users post a given link to their news feed without requiring any kind of app permissions with some optional text that they can add to it. How did BuzzFeed do it? The Facebook documentation is very confusing to me which is why I'm having a hard time implementing it myself. It'd be great if somebody could just layout the steps needed to take. What exactly do I need to put in my HTML page? Do I need to create a Facebook app?

Answer

Anirudh Ramanathan picture Anirudh Ramanathan · Nov 5, 2012

To share your web-page, you don't need to create a facebook application.

You can just put that Facebook-share image there, with an href = "http://www.facebook.com/sharer.php?u=<your url>"

Facebook's like button allows sharing as well. The code to generate that for your website is in the official documentation.