Ios 脸书分享成就问题

Ios 脸书分享成就问题,ios,objective-c,facebook-graph-api,Ios,Objective C,Facebook Graph Api,我正在尝试添加以下代码来分享游戏成果。但是,我在发布过程中遇到错误:错误\u原因未完成操作(“FBAPIErrorDomain错误100”)错误\u说明@“发布过程中发生错误。” 有人有什么想法吗 // Create share photo by path NSString* picPath = [NSString stringWithUTF8String:path]; UIImage *img = [UIImage imageWithContentsOfFile: picPath]; FBS

我正在尝试添加以下代码来分享游戏成果。但是,我在发布过程中遇到错误:错误\u原因未完成操作(“FBAPIErrorDomain错误100”)错误\u说明@“发布过程中发生错误。” 有人有什么想法吗

// Create share photo by path
NSString* picPath = [NSString stringWithUTF8String:path];
UIImage *img = [UIImage imageWithContentsOfFile: picPath];

FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = img;
photo.userGenerated = YES;

// Create Object
NSDictionary *properties = @{
                             @"og:type": @"game.achievement",
                             @"og:title": @"Game Achievement Title",
                             @"og:description": @"Game Achievement Desc",
                             @"og:url": @"http://www.baidu.com",
                             @"og:image": @[photo]
                            };
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];

// Create Action
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"games.achieves";
//[action setString:@"testtest" forKey:@"achievement"];
[action setObject:object forKey:@"game.achievement"];
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"game.achievement";

// show share dialog
FBSDKShareDialog *_shareDialog = [[FBSDKShareDialog alloc] init];
_shareDialog.delegate = s_shareDelegate;
_shareDialog.shouldFailOnDataError = YES;
_shareDialog.shareContent = content;
_shareDialog.fromViewController = (UIViewController *)[AppController getRootViewController];
[_shareDialog show];

game.Acquisition对象需要game:points属性。将其添加到属性对象:

 @"game:points": @"1",

如需参考,请参见

如果该成就已授予某个用户,则该用户无法再次获得该成就,而该用户在使用FBSDKShareDialog时会导致didFailWitgError。 希望能有所帮助