How do I allow a user to post an item directly to their facebook wall?

I'm creating a site that has images and video behind a login. I'd like the user to be able to share an asset but the can't share the url since you have to be logged in to see it. I know I can create an app that has the user connect their facebook to my site that will in turn allow the to post the asset directly to their page saving it to their photo and video albums.

Problems is, I can't quite figure out how to do it. I have the Facebook Dev documentation pulled up: Post

However, I can't figure out how to add a "post to facebook" button that would allow the user to connect and share the asset without requiring a URL to the item itself.

Does anyone know of a tutorial or a great resource to get me started?

Answers


If you can get your image directory to be accessible outside of your secure area you can use the Facebook sharer url. You will only have to share the url of the created image not a url to any actual page.

This is the link your share button would go to: https://www.facebook.com/sharer/sharer.php?u=http://zef.me/wp-content/uploads/2008/02/funny-cat.jpg

Example for building link or button:

<a href="https://www.facebook.com/sharer/sharer.php?u={url to image}" target="_blank">
 Share on Facebook
</a>

Need Your Help

call a jsp method from javascript

javascript jquery jsp

I use a method in jsp page like this and the page is saved in the name of new.jsp

Changing to a Parameterized Oracle query

c# asp.net asp.net-mvc asp.net-web-api parameterized-query

I am having the below code for connecting to a Oracle database and returning JSON result. But the below code seems to have issues like sql injection, how can I change them being the current code to...