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?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- facebook error invalid key hash for some devices
This is what works.
in HTML:
Where you replace http://google.com with your URL.
in PHP, if you want it to pull the url you are on:
If you want to customize that share page, try this:
Javascript Popup Example:
Edit the page you want to be shared, add these to the meta tags in the head.
There is a list of the og properties other than these here- http://ogp.me/
Next insert this where you want the share button on your page,
Obviously take out the xxx's and leave the " " , if you change any of the above while testing you may have to go to facebook debugger and debug it as it sometimes hold on to the original content.
hope this helps
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.