문제

My query string looks like this : NSString *query = [NSString stringWithFormat:@"SELECT id, name, pic, type, url, username from profile where id = %@", sourceID]; I finally get the profile. In my app, I want to show the profile pic. So I take the string out of the "pic" parameter. The url is very weird though. It looks something like this : https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash1/t5/1209883_196371450373992_763018152_s.jpg

On google, people say that akamaihd is a virus. I just don't understand how a fql request can return to me an url that is linked to a virus... Please help!

I also want to add that the SDWebImage framework doesn't return an image at all. But, if I copy paste this url in my browser, it shows me the exact image I want to get. I don't understand at all what is happening.

도움이 되었습니까?

해결책

It looks like you have the facebook user id, so you actually don't need to perform another FQL request. All you need to do to get the profile picture url is to do:

NSString *profilePictureURL = [NSString stringWithFormat:@"https://graph.facebook.com/%@/picture?width=100&height=100", userId];

then, use this url to load a user profile pic.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top