在 ios 6 中检索 Facebook 帐户信息 [英] Retrieve Facebook Account Information in ios 6
问题描述
我想在 ios 6 集成的 Facebook 上检索 facebook 帐户的信息,现在我这样做,我只能检索用户名:
i want retrieve the information of a facebook account on the ios 6 integrated Facebook, now i do it in this way and i can retrieve only the username:
ACAccountType *accountTypeF = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) {
if(granted) {
NSArray *accountsArray = [accountStore accountsWithAccountType:accountTypeF];
ACAccount *facebookAccount = [accountsArray objectAtIndex:0];
if (facebookAccount.username) {
}
}
}];
我想知道如何检索帐户的名称和姓氏以及用户的照片...有人可以帮助我吗?
i want know how i can retrieve also the Name and Surname of the account and the pic of the user...anyone can help me?
推荐答案
Jeffrey 是对的.转到此帖子:Facebook iOS 6 - 获取用户信息 并实现 2 种方法丹尼尔提供.
Jeffrey is right. Go to this post: Facebook iOS 6 - get user info and implement 2 methods given by Daniel.
之后,请确保在 facebook 开发者帐户
上的应用程序设置中进行一些更改.
After then make sure to make some changes in your application settings on facebook developer account
.
- 在主设置页面禁用
沙盒模式
- 把你的应用程序
bundle id
启用
facebook 登录
- On main settings page disable
sandbox mode
- Put your applications
bundle id
Enable
facebook login
然后去左边的Advance
设置
- 选择
Native/Desktop
作为App Type
- 确保
客户端中的应用密码
为NO
保存所有设置,在服务器上填充更改确实需要几分钟时间.最后必须重置你的模拟器
Save all settings and it really takes few minutes to populate the changes on server. Finally Must reset you simulator
这篇关于在 ios 6 中检索 Facebook 帐户信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!