简体   繁体   English

iPhone上的FBConnect。 关于个人资料图片的问题

[英]FBConnect on iPhone. question about the profile image

Im developoing an app for the iPhone where users can chat using their facebook account info. 我正在为iPhone开发一个应用程序,用户可以使用其Facebook帐户信息聊天。 in this case: the facebook username & profile image. 在这种情况下:facebook用户名和个人资料图片。 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 替代文字http://img98.imageshack.us/img98/5103/screenshotrci.png

first get the album name by using FBconnect.photos.getAlbum and pass UID. 首先使用FBconnect.photos.getAlbum获取相册名称并传递UID。 it will return an array with all album info .then find the album name " profile pictures" and their album id. 它将返回一个包含所有相册信息的数组。然后找到相册名称“个人资料图片”及其相册ID。 after that use this album id to get the profile photo . 之后,使用此相册ID来获取个人资料照片。

using this api FBConnect.photos.get and pass album id as params 使用此api FBConnect.photos.get并将相册ID作为参数传递

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 这可能会有点晚,但是您需要做的就是将“ pic_square”(50x50图像)放入用于获取名称的fql查询中

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. 就是这样,它将返回一个字符串,其中包含所需图像的URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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