I have id of user on facebook. Now I want to get user avatar base on the link https://graph.facebook.com on iOS.
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.
Try to use via this link :
https://graph.facebook.com/user_id/picture?type=normal
Hope this works.
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
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