简体   繁体   中英

FBConnect on iPhone. question about the profile image

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 msg, 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM