Facebook photo sharing to friend's wall

Midhere picture Midhere · Jun 30, 2011 · Viewed 10.5k times · Source

I am developing a greeting card application. Greeting card should be posted to multiple friends' wall. I had used graph API to upload picture to friend's wall using [friends_Id]/photos post. Using this approach Facebook will create an album in to that user account automatically rather than creating or sharing photo to friends. After photo upload this newly created album will be shared to friends. This is not the option which I'm looking. Facebook will use the same album for other photo uploads. Since album was shared to some friends, all previously shared friends will get notifications on their news feed for this new photo upload. So I omitted this approach.

Second I used posting image link to friend's feed. This time Facebook won't allow me to post image links with hosted on their server saying that FCDN images are not allowed in stream. Hosting a server will be an expensive option for me.

Third I used photo tagging approach. This work well. But this is not the required option.

In Facebook website there is an option to share a photo in an album to my friends wall. Can I implement this approach using graph API? Is there any option to share an uploaded image to friend's wall using graph API?

I hope that my question is clear to you... Please help.. :)

Answer

C Abernathy picture C Abernathy · Aug 24, 2011

Perhaps this approach will work you. See https://developers.facebook.com/blog/post/526/ where you can post to a wall and refer to an existing photo, or basically attach a photo you own to a friend's wall. So here are the steps: 1) Upload the photo you are interested in sharing to your album. Note the photo ID. 2) Send an HTTP POST to https://graph.facebook.com/[FRIEND_ID]/feed with the object_attachment parameter set to your photo ID.

Please note that you will need an access token with publish_stream permission.