Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get user avatar link of facebook with userid

I have id of user on facebook. Now I want to get user avatar base on the link https://graph.facebook.com on iOS.

like image 796
Tan Vu Avatar asked Feb 18 '14 09:02

Tan Vu


People also ask

How do I find Facebook user data?

You can get user data by using the Facebook Graph API if the user has given their permission to share their data and your app has the appropriate permissions to receive this data. This topic shows you how to make a single request for data and how to have a batch of requests in a single request.


2 Answers

Try to use via this link :

https://graph.facebook.com/user_id/picture?type=normal

Hope this works.

like image 194
Phat H. VU Avatar answered Nov 14 '22 01:11

Phat H. VU


As i also gave you the first comment so explaining it.

If you looking the Avatar link try

http://graph.facebook.com/username/picture

where you can try the username like sunnyleone or you can use the facebook userid like for sunnyleone the userid is 131218490419638.

if you looking your facebook id you can get it from here. for your examples.

And One Major thing that nobody checked Image size is small for you can add parameter like

?type=normal

or for more bigger image. But the best one is you can replace the redirect link like.

replace _s to _n

Small Image : http://profile.ak.fbcdn.net/hprofile-ak-prn1/t5/162024_131218490419638_623017319_s.jpg

Big Image : http://profile.ak.fbcdn.net/hprofile-ak-prn1/t5/162024_131218490419638_623017319_n.jpg

then you can get the bigger Image.

Hope this will help you

like image 28
Buntylm Avatar answered Nov 14 '22 01:11

Buntylm