- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
好吧,我正在为从 Facebook IOS SDK (3.1.1) 获取一些基本用户信息而苦恼。在使用其他平台进行 FB 开发后,我非常确信我的问题与 FB 应用程序的设置有关,而不是与我的代码有关。顺便说一句,我在 iTunes 中并为 iPhone 设置了一个 iTunes ID。我还根据我的 bundle ID 仔细检查并四次检查了应用程序中的 bundle ID。
现在我可以对测试用户进行身份验证并获取所有详细信息等。效果很好。当我以像我这样的真实用户身份登录时(我是该项目的开发人员),我得到了一个 Auth token ,但是获取用户的调用失败了,我不确定我做错了什么(如果它适用于作为测试用户,它应该适用于所有人)。
我只需要从用户那里得到,顺便说一句,就是他们的名字、姓氏、FB 用户 ID 和电子邮件地址(可选,但需要)。
目前在使用 games tutorial 进行身份验证后.登录后,我会执行以下操作(尽管我做了很多其他事情,结果相同):
- (void)fbDidLogin
{
// removed the setup for the class level Facebook var that I am currently not using
// get information about the currently logged in user
NSString *fql = @"select uid, first_name, last_name, email from user where uid = me()";
NSDictionary *queryParam = [NSDictionary dictionaryWithObjectsAndKeys:fql, @"q", nil];
[FBRequestConnection startWithGraphPath:@"/fql"
parameters:queryParam
HTTPMethod: @"GET"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
[self meRequestResult:result WithError:error];
}];
}
meRequestResult 例程是这样开始的:
- (void)meRequestResult:(id)result WithError:(NSError *)error
{
if ([result isKindOfClass:[NSDictionary class]])
{
NSDictionary *dictionary;
if([result objectForKey:@"data"])
dictionary = (NSDictionary *)[(NSArray *)[result objectForKey:@"data"] objectAtIndex:0];
else
dictionary = (NSDictionary *)result;
[fbUserData release];
fbUserData = [dictionary retain];
NSString *facebookId = [dictionary objectForKey:@"id"];
if(!facebookId)
facebookId = [dictionary objectForKey:@"uid"];
// and more follows that is not pertinent
当我在 FB IOS SDK 中打开请求日志记录时。我看到了同样的东西,但在任何地方都找不到这些是什么意思的描述。
这是日志中的最后 10 行左右:
2012-12-03 11:52:12.394 mTender[6572:1cd03] Reachability Flag Status: -R -----l- networkStatusForFlags
2012-12-03 11:52:12.395 mTender[6572:1cd03] The internet is working via WIFI.
2012-12-03 11:52:12.396 mTender[6572:1cd03] Reachability Flag Status: -R ------- networkStatusForFlags
2012-12-03 11:52:12.396 mTender[6572:1cd03] A gateway to the host server is working via WIFI.
2012-12-03 11:52:35.093 mTender[6572:1cd03] FBSDKLog: Request <#1111>:
URL: https://graph.facebook.com//fql?sdk=ios&access_token=ACCESS_TOKEN_REMOVED&q=select%20uid%2C%20first_name%2C%20last_name%2C%20email%20%20from%20user%20where%20uid%20%3D%20me%28%29&migration_bundle=fbsdk%3A20121003&format=json
Method: GET
UserAgent: FBiOSSDK.3.1.1
MIME: multipart/form-data; boundary=3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f
2012-12-03 11:52:37.194 mTender[6572:1cd03] Error: HTTP status code: 500
2012-12-03 11:52:37.196 mTender[6572:1cd03] FBSDKLog: Response <#1111> <Error>:
The operation couldn’t be completed. (com.facebook.sdk error 5.)
希望有人能解决这个问题。这是该项目的最后一步..
最佳答案
我正在做与您非常相似的事情。我正在使用 Facebook 登录,这样我就不必担心存储密码之类的问题。
我关注了this一套说明.. facebook 网站的布局方式似乎很糟糕,到处都是过时的东西。
您可以使用 native Facebook 或基于网络的用户身份验证(SDK 将管理所有这些),因此它可以在旧版本的 iOS 上运行,并且在未登录 native Facebook 时也能正常工作。
您将设置一个处理程序,它将为您提供一个“NSDictionary *user”,其中包含您需要的所有内容。无需在 iphone 客户端上使用 graph api。
关于objective-c - IOS Facebook SDK登录后无法获取用户信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13688501/
我正在细读 http://www.khronos.org/网站,只找到了 OpenCL 的头文件(不是我不关心的 OpenGL)。如何获取 OpenCL SDK? 最佳答案 AMD 的 ATI Str
Android 项目中最低(最低 sdk)和最高(目标 sdk)级别是否有任何影响。这些东西是否会影响项目的可靠性和效率。 最佳答案 没有影响,如果您以 SDK 级别 8 为目标,那么您的应用将以 9
“min sdk version/target sdk version”和“compile sdk version”有什么区别?我知道 min 和 target sdk 是什么意思,但是 compil
我正在尝试运行 Dji Mobile-Sdk-Android:https://github.com/dji-sdk/Mobile-SDK-Android使用 dji 网站上的说明:https://de
我目前正在向我的 iPhone 应用程序添加新的 Facebook iOS sdk 3.1.1。我看到 sdk 有重大变化。例如。我的旧 sdk 创建一个 Facebook 对象并从 FBReques
我最近刚刚下载了 Xcode 4.6 with mac 10.8.4 with iOS 6.0 SDK package,我立即注意到我无法使用我的 iPhone 3Gs with iOS 4.6 进行
我尝试下载 OpenCL SDK。但是没办法。我有一个 AMD GPU,所以我在谷歌上搜索了 AMD SDK,但是来自谷歌的所有链接和一些教程都被破坏了,不可能通过 AMD 开发者网站找到 sdk。
安装 Google Cloud SDK 后,当我运行时 gcloud 授权登录 我收到一条错误消息: Your browser has been opened to visit: https://a
我一直在 nvidia 网站上搜索 GPU 计算 SDK,因为我正在尝试构建具有 cuda 支持的点云库 (PCL)。但是,在 nvidia 网站上,我只能找到工具包的链接,而不是 SDK 的单个下载
Closed. This question needs to be more focused。它当前不接受答案。 想改善这个问题吗?更新问题,使其仅关注editing this post一个问题。 2
当我打开 Android SDK 管理器时,会出现一个屏幕“选择要安装的包”。它列出了一堆带有绿色复选标记(已经安装)的软件包,还有一些带有 x's 的软件包,它们没有安装。如果我选择“全部接受”,它
在开发过程中,我发布了 SDK 21 Lollipop,但我无法在我的 KitKat 设备上使用它。应用程序非常简单,我只将 SDK 用于动画和 Material 设计,但是当我尝试对 Play 商店
enter image description here friend 们好 在使用 Linux、jenkins 和 docker 探索 dotnet 核心时,我遇到了构建问题,该问题在标题“/usr
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and th
我创建了一个flutter项目,运行flutter packages get,输出如下:【二】flutter包搞定等待另一个 flutter 命令释放启动锁...第二次运行“flutter packa
这个问题在这里已经有了答案: What are the Android SDK build-tools, platform-tools and tools? And which version sh
我使用 Corona SDK 已经快一年了,并且开发了几个简单的游戏。我现在正在寻找的是在 Corona SDK 中创建 3D 幻觉的某种方法。如果有人有 Corona 3D 方面的经验,我将不胜感激
我有一个CLDC 1.1 / MIDP 2.0项目,可以使用Java ME SDK 3.2很好地进行编译。 最近,我已将Java SE升级到8,结果Java ME SDK开始在Windows启动时显示
有没有办法以编程方式控制连接到华擎主板的 RGB 照明?我知道华硕有一个 Aura SDK,但华擎是否也有一个用于他们的硬件? 如果是,我在哪里可以找到它? 最佳答案 没有用于华擎多彩的 sdk。但是
如何使用 crm 2011 sdk 和 XrmServiceContext 创建事务? 在下一个示例中,'new_brand' 是一些自定义实体。我想创建三个品牌。第三个拥有错误的 OwnerID g
我是一名优秀的程序员,十分优秀!