开发者

FBConnect on iPhone. question about the profile image

开发者 https://www.devze.com 2022-12-20 18:13 出处:网络
Im developoing an app for the iPhone where users can chat using their facebook account info. in this case: the facebook username & profile image. my question is How can I share the users profile p

Im developoing an app for the iPhone where users can chat using their facebook account info. in this case: the facebook username & profile image. my question is How can I share the users profile picture in the chat box so that people can see each others avatars?

the pictures must be online somewhere? how to get to that url?

I should do somthing like this when the send button is tapped:

get the username, get the ms开发者_开发问答g, get the the avatar url. send the info to the chat server.

alt text http://img98.imageshack.us/img98/5103/screenshotrci.png


first get the album name by using FBconnect.photos.getAlbum and pass UID. it will return an array with all album info .then find the album name " profile pictures" and their album id. after that use this album id to get the profile photo .

using this api FBConnect.photos.get and pass album id as params


this might be a little late, but all you need to do is put "pic_square" (a 50x50 image) into the fql query that you use for getting the name

NSString* fql = [NSString stringWithFormat:@"select uid, name, pic_square from user where uid == %lld", self.usersession.uid];

and that's it, it'll return a string with the URL of the image you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号