我在使用
Cocoapods的最新版iOS 10和最新的Facebook SDK上登录Facebook时遇到问题.这工作正常,现在它不起作用.当我从登录回来时,访问令牌是零.以前不是零.我确实在日志中看到了一条消息.我用Google搜索错误,但找不到任何内容.我已按照Facebook开发人员登录指南中的说明进行操作.
2016-11-04 10:10:26.122435 Ghosts[833:83731] FBSDKLog: Invalid identifier: ‘fb_mobile_login_native_app_switch_dialog_result’. Must be between 1 and 40 characters,and must be contain only alphanumerics,_,– or spaces,starting with alphanumeric or _.“`
if ([FBSDKAccessToken currentAccessToken]) { }
FBSDKCoreKit 4.17.0
iOS 10.1.1
Xcode 8.1
Objective-C与ARC
解决方法
事实证明,访问令牌可以在之后立即为零.您必须等待通知才能使用它.我认为这是一项新要求.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkLogIn) name: FBSDKAccessTokenDidChangeNotification object:nil];
.
我想其他错误信息只是一个警告.