How can I post an uploaded photo to a user’s wall/feed?
My application generates an image with the name of the user and some information. It looks like a certificate. I upload this image to the user’s profile, but it doesn’t appears on the feed. So the friends don’t see that. I tried to post it with –
$post = $facebook->api('/me/feed', 'POST', array(...));
But I realized, that I can’t post Facebook hosted photos. But there are many applications on Facebook that generate images, uploads them and posts them to a wall. But how?
You can post facebook-hosted pictures onto the user’s wall. You need to do a simple wall post, and include the
object_attachmentparameter, which contains the picture’s id. It is documented here, near the bottom of the table.You can find more details in this blogpost. It also contains the following example: