Reputation: 11187
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?
Upvotes: 0
Views: 56
Reputation: 135
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>
Upvotes: 1