I use the JavaScript SDK for Facebook Connect. Yesterday I loaded all the friends of a logged in user like this:
https://graph.facebook.com/me/friends?fields=name,first_name,picture&access_token=MYACCESSTOKEN&callback=?
Using this code I got the id, name, first name and picture of all the friends that the logged in user has. This was called using AJAX/jsonp. As I said, it worked yesterday and no modifications have been done to the code since then.
Today I get the id, name and the first name - no picture(!) Could this be a glitch in Facebook Graph, has there been any updates that I could have missed or is the above call to the graph API invalid?
Is this a correct way to get the picture of all friends?
You're right, the picture field is not being returned anymore. However it is very easy to get the picture URL. http://graph.facebook.com/{friendId}/picture
you can either call that to get it programmatically, or even have that graph call as the src attribute of the image tag <img src="http://graph.facebook.com/{friendId}/picture" />
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With