不能执行授权给Facebook与iOS SDK和原生的Facebook应用程序 [英] Can't auth to Facebook with iOS SDK and native Facebook application

查看:241
本文介绍了不能执行授权给Facebook与iOS SDK和原生的Facebook应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有什么和发生的问题干嘛:

What I have and what're problems occurred:


  1. 我已经与游戏应用程序(每天都有人的上场)
  2. 一个Facebook帐户
  3. 我已经多了一个Facebook帐户与测试应用程序,即使用默认设置最近创建的。

  4. 我在我的iPod已经原生的Facebook应用程序

  5. 我正在开发,它使用的Facebook的iOS SDK的iOS应用程序。

  1. I've one Facebook account with game application (every day people's playing)
  2. I've one more Facebook account with test application, that created recently with default settings.
  3. I've native Facebook application on my iPod
  4. I'm developing iOS application which uses Facebook iOS SDK.

无效流量:

如果我用从第一个应用程序的应用程序ID / API密钥,我打开我的应用程序,并试图登录。 Facebook的SDK打开本地FB应用程序,并告诉我,屏幕

If I use App ID/API Key from first application, I open my application and trying to login. Facebook SDK opens native FB application and show me that screen

我preSS确定,回到我的iOS这样的错误,并没有访问令牌:

I press OK and go back to my iOS with such error and without access token:

(NSError *) $0 = 0x001710f0 Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0x16d4b0 {com.facebook.sdk:ErrorLoginFailedOriginalErrorCode=210}

有效流量:

如果我使用第二(测试)应用程序的应用程序ID / API密钥,我打开我的应用程序,并试图登录。 Facebook的SDK打开本地FB应用程序,并告诉我,屏幕

If I use App ID/API Key from second (test) application, I open my application and trying to login. Facebook SDK opens native FB application and show me that screen

我preSS确定,回到我的iOS与有效的访问令牌。

I press OK and go back to my iOS with valid access token.

应用程序设置都是一样的,我没有看到任何差异。如果我有原生的Facebook应用程序出现此问题。如果我没有它,Facebook的SDK打开浏览器,并授权将是成功的第一和第二的App ID。

Settings of applications are the same, I didn't see any differences. This problem occurred if I have native Facebook application. If I haven't it, Facebook SDK opens browser and authorization will be successful with first and second App ID.

如果有人有这样的问题,请大家帮忙。非常感谢。

If someone had such problem, please help. Thanks a lot.

推荐答案

我解决了这个问题。

改变这里和那里后,其实我发现我的包ID不匹配。我一直包ID同样在以下3个地方,它的工作:

Actually after changing here and there I found my bundle id was not matching. I have kept the bundle id same in the following 3 places and it worked:


  1. 您的项目捆绑标识符。

  2. 在FB的A / C的申请命名为iOS版捆绑ID:在头原生iOS应用

  3. 在AppDelegate.m通知字符串值

    的NSString * const的FBSessionStateChangedNotification = @yourbundleid:FBSessionStateChangedNotification;

这篇关于不能执行授权给Facebook与iOS SDK和原生的Facebook应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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