0

很长一段时间以来,我一直在尝试添加 OpenGraph 帖子,但我无法弄清楚当前的文档和教程的断开链接。

相关设置(由值组成):FB 命名空间:“spot_app” 打开图形对象类型:“Spot”,继承自 Place,因为这将包含指向谷歌地图中某个地点的链接。

我试图讲述这个故事:“UserX 保存了一个 Spot”,然后是用户评论和业务信息。

相关代码:

NSDictionary *properties = @{@"og:type":@"spot_app:Spot",
                             @"og:title":@"Spot OpenGraph Title",
                             @"og:description":@"Spot Description",
                             @"og:site_name":@"spotAppSite.com",
                     @"og:url":googleURL};

FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
FBSDKShareOpenGraphAction *action = [FBSDKShareOpenGraphAction actionWithType:@"save.saves" object:object key:@"spot_app:Spot"];

FBSDKShareOpenGraphContent *content = [FBSDKShareOpenGraphContent new];
content.action = action;
content.previewPropertyName = @"spot_app:Spot";

FBSDKShareAPI *shareAPI = [FBSDKShareAPI new];
shareAPI.shareContent = content;
shareAPI.delegate = self;
[shareAPI share];

周围的文档FBSDKShareOpenGraphAction很差,并且在几个不同的地方对如何使用“保存”操作说了几件不同的事情。

关于我哪里出错的指导?我目前收到错误:Failed: The operation couldn’t be completed. (com.facebook.sdk.share error 201.)

4

0 回答 0