FBDialogs
功能始终返回No
。
我无法理解为什么......
这是代码:
UIImage* image2 = [UIImage imageNamed:[imageInfo objectAtIndex:1]];
BOOL canPresent = [FBDialogs canPresentShareDialogWithPhotos];
NSLog(@"canPresent: %d", canPresent);
FBPhotoParams *params = [[FBPhotoParams alloc] init];
params.photos = @[image2];
BOOL isSuccessful = NO;
if (canPresent) {
FBAppCall *appCall = [FBDialogs presentShareDialogWithPhotoParams:params
clientState:nil
handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
if (error) {
NSLog(@"Error: %@", error.description);
} else {
NSLog(@"Success!");
}
}];
isSuccessful = (appCall != nil);
}