【发布时间】:2015-05-21 17:14:25
【问题描述】:
我在尝试发帖时对一位用户有一种非常奇怪的行为。 (ipad 2, ios8.3, 解析 1.7.4)
(来自我的设备,一切正常)。
bGranted_publish_actions = 始终为假 bGranted_user_photos = 总是错误的
当我调用 linkUserInBackground 时,我可以看到 facebook 应用程序正在打开(很长),然后直接关闭(不是事件看到权限屏幕的时间),然后我的 ios 应用程序重新打开。 错误=无 成功=否
有什么想法吗?
-(void)postShareToFacebookWithDescription:(NSString *)description andBlock:(void (^)(NSError *))completionBlock{
NSLog(@"ℹ️--[%s:%d]",__PRETTY_FUNCTION__,__LINE__);
bool bGranted_publish_actions=[[FBSDKAccessToken currentAccessToken] hasGranted:@"publish_actions"];
bool bGranted_user_photos=[[FBSDKAccessToken currentAccessToken] hasGranted:@"user_photos"];
if (!bGranted_user_photos || !bGranted_publish_actions ){
//withPublishPermissions:@[@"publish_actions", @"user_photos"
[PFFacebookUtils linkUserInBackground:[PFUser currentUser] withPublishPermissions:@[@"publish_actions"] block:^(BOOL succeeded, NSError *error) {
if (succeeded) {
NSLog(@"User now has read and publish permissions!");
[self postDataWithPhoto:nil];
} else {
if (completionBlock) {
completionBlock(error);
}
}
}];
} else {
NSLog(@"Got Facebook publish permissions and about to share");
[self postDataWithPhoto:nil];
}
}
【问题讨论】:
标签: ios facebook parse-platform