在 htttps://developer.facebook.com 中,他们使用 API 调用示例登录,他们要求在我的应用程序 delegate.m 文件中输入以下代码
// Whenever a person opens the app, check for a cached session
if (FBSession.activeSession.state == FBSessionStateCreatedTokenLoaded) {
// If there's one, just open the session silently, without showing the user the login UI
[FBSession openActiveSessionWithReadPermissions:@[@"basic_info"]
allowLoginUI:NO
completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
// Handler for session state changes
// This method will be called EACH time the session state changes,
// also for intermediate states and NOT just when the session open
[self sessionStateChanged:session state:state error:error];
}];
它向我显示错误,例如 ---- No visible @interface for 'AppDelegate' 声明了 'sessionStateChanged:state:error:' 提前谢谢...