Home Get Facebook photo id by it's external source url
Reply: 2

Get Facebook photo id by it's external source url

Minstel
1#
Minstel Published in 2018-02-12 17:38:32Z

I'm uploading photos to Facebook page album by script. Each photo is specified with external, non-facebook url, so actually these urls are uploaded, representing photos.

Some time after upload I may need to check if given photo was uploaded (it's possible, that it was not marked as uploaded by script).

Is it possible in Facebook API to obtain uploaded photo id, using it's external source url, by which it was uploaded?

JorgeO
2#
JorgeO Reply to 2018-02-12 19:29:50Z

After you upload the picture you get an id as a response of your post request.

curl -i -X POST \
 -d "url=https://www.facebook.com/images/fb_icon_325x325.png" \
 -d "caption=test photo upload" \
 -d "access_token=<user_photos_user_access_token>" \
 "https://graph.facebook.com/v2.11/me/photos"

I'm pretty sure you can query that id using get request to https://graph.facebook.com/v2.11/{id-of-photo}

You can also use the Graph Api Explorer to learn of the fields available for that object.

Graph Api Explorer

Minstel
3#
Minstel Reply to 2018-02-14 17:55:54Z

As noted @WizKid in a comment to issue, getting photo ID by it's original external source url is not possible.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.412611 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO