我已将最新的 Facebook SDK 添加到XCode 7.1
为iOS 9.1
. 不幸的是,我只知道Swift,而不是Objective C。Facebook 的开发者站点文档只有Objective C中的文档。在 Google 上的每次搜索都会显示太旧的文档,因为在过去的 6 个月里事情发生了很大的变化。所以我有点迷路了。
我用 plist 文件做了所有简单的事情。
我能够使用:
import FBSDKCoreKit
import FBSDKLoginKit
我还补充说:
return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
和
return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
到我的AppDelegate.swift
档案。这一切都有效并成功构建。显然,我也添加了正确的框架。除此之外,我处于停滞状态,因为我不知道添加登录按钮的语法,用于捕获我认为将返回的带有令牌的 json 字符串和其他可用于存储在用户帐户中的配置文件信息等.