Vasilii Kasnitski
Vasilii Kasnitski

Reputation: 103

Facebook does not allow post photo url, which refers to the Facebook's server

I try to use this picture url when I share post to the Facebook wall https://fbcdn-photos-e-a.akamaihd.net/hphotos-ak-prn2/t1/1509934_1399389213653861_1680466495_a.jpg.

But I get an error, which says: "An unknown error has occurred.". It's very strange, because when I try to use this picture url: http://zastavki-oboi.ru/thumbs/oranjevyi_cvetochek-4636.jpg I do not get any errors.

I really do not understand, why first one does not work, but second one works correctly!

Any ideas?

Upvotes: 3

Views: 465

Answers (1)

chrisboustead
chrisboustead

Reputation: 1563

You probably want to post to the /feed edge with an object_attachment specified. The object_attachment being the Facebook object ID of the image you want to share. The app user will also need to be the owner of that photo.

object_attachment

Facebook ID for an existing picture in the person's photo albums to use as the thumbnail image. They must be the owner of the photo, and the photo cannot be part of a message attachment.

See under Publishing: https://developers.facebook.com/docs/graph-api/reference/user/feed/#

And a note, if you only have the url of the image, the object ID should be the middle set of numbers in the filename. 1509934_1399389213653861_1680466495_a.jpg.

Upvotes: 1

Related Questions