2
雖然使用這種方法
([login logInWithReadPermissions:@[@"email"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error)
如何使用FBSDKLoginManager實現使用FB進行登錄?
總是得到的結果isCancelled
到YES
。並獲得AccessToken
作爲null
雖然使用這種方法
([login logInWithReadPermissions:@[@"email"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error)
如何使用FBSDKLoginManager實現使用FB進行登錄?
總是得到的結果isCancelled
到YES
。並獲得AccessToken
作爲null
添加以下行applicationDidFinishLaunching
return [[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
和AppDelegate.m
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
信用添加這個方法去FBSDKLoginManager logInWithPublishPermissions always returns isCancelled=YES
嗨channi,我在這兩種方法appdelegate.m即使我沒有獲取訪問令牌 –
你有沒有檢查這個鏈接尚未https://developers.facebook.com/docs/ios/getting-started#startcoding來驗證你的應用程序設置 – channi
請解決它可以幫助別人分享問題 – channi