【问题标题】:how to set facebook app id in iOS如何在 iOS 中设置 Facebook 应用程序 ID
【发布时间】:2012-12-06 08:37:15
【问题描述】:

我认为应用程序需要将应用程序 ID 提交到 facebook 服务器以通过 OAuth ,获得用户的许可,然后获取活动会话以读取/发布信息。

我正在寻找类似的东西:

Facebook fb = new Facebook("YOUR_APP_ID");

我查看了“Facebook iOS SDK”教程和项目“HelloFacebookSample”,但没有找到任何代码来设置我的 App ID。如何设置我的 App ID 和 App Secret?如何让“HelloFacebookSample”使用我的应用程序,而不是使用官方示例应用程序? 我正在使用 Xcode。谢谢。

【问题讨论】:

  • Follow this tutorial 我希望这会有所帮助。
  • 我错过了一些东西。我应该在 info.plist 文件中设置它

标签: facebook-ios-sdk app-id


【解决方案1】:

你应该在 Info.plist 中最后一个 </dict> 元素之前设置它

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fbxxxxxxxxxxxxxxx</string>
        </array>
    </dict>
</array>
<key>CFBundleVersion</key>
<string>2.8</string>
<key>FacebookAppID</key>
<string>xxxxxxxxxxxxxxx</string>
<key>FacebookDisplayName</key>
<string>{{Your app name}}</string>

来源:https://developers.facebook.com/docs/ios/getting-started

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-04
    • 1970-01-01
    • 2021-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多