How do I get user’s profile photo URL upon connecting to my App? Not a big photo, but some sort of profile picture which would display only face photo of the user. (like the one is displayed next to the comment entry in Facebook comments)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Once connected to your app, all you need is to grab their user id. You can get this by calling https://graph.facebook.com/me (or parsing the access_token Facebook gave you). To get the users friends photos, you will want to access /me/friends and grab the id’s. The image you are most likely looking for is this one, as it is their face and always a small squre:
https://graph.facebook.com/4/picture?type=square
The other images will all be variable sizes across users:
https://graph.facebook.com/4/picture?type=small
https://graph.facebook.com/4/picture?type=normal
https://graph.facebook.com/4/picture?type=large