I found some answers for this but I can't put this to work. I'm having some trouble to share a local image to a Facebook wall.
What I want is to upload a local image to a Facebook wall with the share dialog.
I've tried to upload the image with PHP sdk with success, but I was unable to show the share dialog.
With js sdk I'm able to show the share dialog but can't upload a local file without using <input type='file />'
.
The share dialog does not offer any possibility to upload an image, you can only share an URL - and of course it has to be an absolute and public one: https://developers.facebook.com/docs/sharing/reference/share-dialog
The image will be taken from that URL ( og:image
tag).
You can create a custom share dialog, authorize the User with publish_actions
and use the PHP SDK to upload a picture.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.