views:

382

answers:

3

Hi, 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

+1  A: 

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

thanks worked perfectly
Alexandergre
A: 

would you mind posint some souce code.

thank you

vasilios hioureas
A: 

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.

Rob Contreras