我正在尝试使用“客户端登录操作”在我的 azure-mobile 服务上使用 Facebook 帐户授权用户(http://msdn.microsoft.com/en-us/library/windowsazure/jj710106.aspx)
NSArray* permissions = @[@"email, user_about_me, basic_info"];
[FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:YES
completionHandler:^(FBSession* session, FBSessionState status, NSError* error) {
if (!error) {
[_msClient loginWithProvider:provider
token:@{@"access_token" : [[session accessTokenData] accessToken]}
completion:^(MSUser* user, NSError* error) {
NSLog(@"%@", error);
}];
}
}];
Error Domain=com.Microsoft.WindowsAzureMobileServices.ErrorDomain Code=-1302 "Error: The Facebook Graph API access token authorization request failed with HTTP status code 400" UserInfo=0x1768ba80 {NSLocalizedDescription=Error: The Facebook Graph API access token authorization request failed with HTTP status code 400}
我可以确认,
NSString* access_token = [[session accessTokenData] accessToken];
返回一个有效的访问令牌,因为它在这里工作https://developers.facebook.com/tools/explorer/?method=GET&path=me没有任何错误。
我究竟做错了什么?