我有以下代码:
[[[PFFacebookUtils logInInBackgroundWithAccessToken:[FBSDKAccessToken currentAccessToken]] continueWithSuccessBlock:^id(BFTask *task) {
PFUser *user = task.result;
return user;
}] continueWithSuccessBlock:^id(BFTask *task) {
BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource];
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:nil];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (error) {
[source setError:error];
return;
}
[source setResult:result];
}];
return source.task;
}];
FBSDKGraphRequest 在 Bolts 任务之外工作正常,但在任务内 startWithCompletionHandler 没有被调用。
有任何想法吗?