Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph API does not return the event picture

Edit: Seems like Facebook finally fixed this bug!


Could you help me understand why this is happening:

This is a public event with a picture: https://www.facebook.com/events/282054218538223

But when I try to access http://graph.facebook.com/282054218538223/picture, all I get is a default picture.


Here is another public event: http://www.facebook.com/events/266496120103339

But this time, accessing http://graph.facebook.com/266496120103339/picture returns the event photo.


What's the difference between the 2 events?

like image 852
Robin Avatar asked Apr 05 '12 15:04

Robin


2 Answers

This answer doesn't explain why the request doesn't work using Graph API but might help someone who needs to to retrieve event profile images.

With FQL you can retrieve the event profile image like this:

SELECT pic, pic_small, pic_big FROM event WHERE eid=282054218538223

using the event id from Robin's first example. This call returns urls to the event profile image in 3 different sizes. It works for both examples in Robin's question, just change the event id.

Try it in Graph Explorer with Robin's example:

https://graph.facebook.com/fql?q=SELECT pic,pic_big,pic_small FROM event WHERE eid=282054218538223

and MoXplod's example:

https://graph.facebook.com/fql?q=SELECT pic,pic_big,pic_small FROM event WHERE eid=271148229633674

Make sure you have access token if needed as outlined in the FQL event table.

like image 169
onosendai Avatar answered Oct 17 '22 15:10

onosendai


having the same problem. it appears to indeed be a bug with the Facebook Graph API.

I currently count at least three separate open bug-reports on the Facebook Developers Bugs page that describe and reproduce the problem (you may need to be logged into FB to access the information) :

Cannot retreive picture of newly created events via Graph API

Some event covers not available via Graph API

Event picture is not accessible via API

fwiw, it might be a good idea to subscribe to all three (duplicate) bug-reports.

like image 20
wehal3001 Avatar answered Oct 17 '22 15:10

wehal3001