在ios 6中检索Facebook帐户信息 [英] Retrieve Facebook Account Information in ios 6
问题描述
ACAccountType * accountTypeF = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL grant,NSError * error){
if(approved){
NSArray * accountsArray = [accountStore accountsWithAccountType:accountTypeF];
ACAccount * facebookAccount = [accountsArray objectAtIndex:0];
if(facebookAccount.username){
}
}
}];
我想知道如何检索帐户的名称和姓氏以及用户的图片任何人都可以帮助我吗?
Jeffrey是对的。转到这篇文章: Facebook iOS 6 - 获取用户信息并实现2种方法由Daniel提供。
此后,请确保在 facebook开发者帐户
上的应用程序设置中进行一些更改。 / p>
- 在主设置页面禁用
沙箱模式
- 将您的应用程序
bundle id
-
启用
facebook登录
然后转到 Advance
左侧的设置
- 选择
Native / Desktop
作为应用类型
- 确保
客户端的应用密钥
不是
保存所有设置,真正需要几分钟时间来填充服务器上的更改。最后 必须重置你的模拟器
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 is right. Go to this post: Facebook iOS 6 - get user info and implement 2 methods given by Daniel.
After then make sure to make some changes in your application settings on facebook developer account
.
- On main settings page disable
sandbox mode
- Put your applications
bundle id
Enable
facebook login
Then go to Advance
settings on the left
- Select
Native/Desktop
asApp Type
- make sure
App secret in client
isNO
Save all settings and it really takes few minutes to populate the changes on server. Finally Must reset you simulator
这篇关于在ios 6中检索Facebook帐户信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!