I’m developing an application that displays a users/friends photos. For the most part I can pull photos from the album, however for user/album cover photos, all that is given is the object ID for which the following URL provides the image:
https://graph.facebook.com/1015146931380136/picture?access_token=ABCDEFG&type=picture
Which when viewed redirects the user to the image file itself such as:
https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/420455_1015146931380136_78924167_s.jpg
My question is, is there a Pythonic or GraphAPI method to resolve the final image path an avoid sending the Access Token to the end user?
The facebook graph api urls do a 302 redirect to the CDN url actually having the user avatar.
You can easily find it using
urllib2Or call the JSON version of Graph api for picture :
http://graph.facebook.com/4/?fields=picture&type=large
Decode it, and get the
url:Tips: