【问题标题】:Tag friends by facebook ID using Open Graph in Objective C在 Objective C 中使用 Open Graph 按 Facebook ID 标记朋友
【发布时间】:2012-11-21 15:14:32
【问题描述】:

FBOpenGraphActionNSArray * tags 期待什么样的元素?从Open Graph Explorer 工具看来,它似乎只是想要一些 facebook ID 作为素材。但是,当这样做时

id<OpenGraphObject> event = (id<OpenGraphObject>)[FBGraphObject graphObject];
event.url = @"http://example.com/obj1234?fb:app_id=1111&og:type=myapp:share";
id<OpenGraphShareAction> action = (id<OpenGraphShareAction>)[FBGraphObject graphObject];
action.object = event
action.tags = [NSArray arrayWithObjects:[NSNumber numberWithInt:3300252], [NSNumber numberWithInt:585025503], nil];

然后用

发帖
[FBRequestConnection
    startForPostWithGraphPath:@"me/myapp:share"
    graphObject:action
    completionHandler: ...
 ];

但是这不起作用 - [__NSCFNumber dataUsingEncoding:]: unrecognized selector sent to instance

【问题讨论】:

    标签: objective-c facebook-graph-api facebook-opengraph facebook-ios-sdk


    【解决方案1】:

    看起来它不需要一个 NSNumber,而是一个 NSString。考虑到我们正在讨论 ID,这将非常有意义。

    试一试,告诉我们进展如何

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-28
      • 1970-01-01
      • 1970-01-01
      • 2018-07-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多