Error: [FBSDKSettings appID] must be specified for batch requests
Error: [FBSDKSettings appID] must be specified for batch requests
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FBSDKGraphRequestConnection: [FBSDKSettings appID] must be specified for batch requests'
我在尝试 运行 2 个批处理请求时遇到此错误。下面的代码显示了我所做的。我该如何解决这个问题?
let requestForOSP =
FBSDKGraphRequest(graphPath: FacebookParameters.OSP,
parameters: [ nil ],
httpMethod: "GET")
let requestForMSA =
FBSDKGraphRequest(graphPath: FacebookParameters.MSA,
parameters: [ nil ],
httpMethod: "GET")
let connection = FBSDKGraphRequestConnection()
connection.add(requestForOSP, completionHandler: { (connection, result, error) in
// DO Stuff
}
connection.add(requestForMSA, completionHandler: { (connection, result, error) in
// DO Other Stuff
}
我解决了
我必须在此处创建一个 Facebook 应用程序:https://developers.facebook.com/apps/、
Select iOS idk,
取应用号
将其放入 Xcode 的 plist 文件
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FBSDKGraphRequestConnection: [FBSDKSettings appID] must be specified for batch requests'
我在尝试 运行 2 个批处理请求时遇到此错误。下面的代码显示了我所做的。我该如何解决这个问题?
let requestForOSP =
FBSDKGraphRequest(graphPath: FacebookParameters.OSP,
parameters: [ nil ],
httpMethod: "GET")
let requestForMSA =
FBSDKGraphRequest(graphPath: FacebookParameters.MSA,
parameters: [ nil ],
httpMethod: "GET")
let connection = FBSDKGraphRequestConnection()
connection.add(requestForOSP, completionHandler: { (connection, result, error) in
// DO Stuff
}
connection.add(requestForMSA, completionHandler: { (connection, result, error) in
// DO Other Stuff
}
我解决了
我必须在此处创建一个 Facebook 应用程序:https://developers.facebook.com/apps/、
Select iOS idk,
取应用号
将其放入 Xcode 的 plist 文件