在ios 6中检索Facebook帐户信息 [英] Retrieve Facebook Account Information in ios 6

查看:216
本文介绍了在ios 6中检索Facebook帐户信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要在ios 6集成的Facebook上检索一个Facebook帐户的信息,现在我以这种方式执行,我只能检索用户名:

  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 as App Type
  • make sure App secret in client is 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆