gpt4 book ai didi

ios - facebook-ios-SDK 问题

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:34:11 26 4
gpt4 key购买 nike

我刚刚开始使用 facebook-ios-SDK。我正在尝试运行示例应用程序以了解框架的工作原理。我以前从未使用过 FB Graph API,或者确实使用过 FB connect。当应用程序运行时,我可以点击登录按钮,然后 Safari 启动以使用我的帐户授权 FB 应用程序。一旦我授权它,我认为该页面会尝试重定向并切换回示例应用程序但失败了,safari 显示“无法打开页面”。

我哪里错了?

最佳答案

您可能需要设置授权回调。这是来自 SDK 的自述文件:

Bind your application to a URL scheme corresponding to your Facebook application ID. The URL scheme you must bind to is of the format "fb[appId]://", where [appId] is your Facebook application ID. Without this, your application won't be able to handle authorization callbacks. Modify your application's .plist file as follows:

  • Under the root key ("Information Property List") add a new row and name the key "URL types".
  • Under the "URL types" key that you just added, you should see a key named "Item 0". If not, add a new row with key "Item 0".
  • Under the "Item 0" key, add a new row and name the key "URL Schemes".
  • Under the "URL Schemes" key that you just added, you should see a key named "Item 0". If not, add a new row with key "Item 0".
  • Set the value of "Item 0" to "fb[appId]" where [appId] is your Facebook application ID. Make sure there are no spaces anywhere in this value. For example, if your application's id is 1234, the value should be "fb1234".

关于ios - facebook-ios-SDK 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6709469/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com