0

NSArray * tagsofFBOpenGraphAction期望什么样的元素?从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

4

1 回答 1

1

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

试试看,让我们知道结果如何

于 2012-11-21T15:42:36.723 回答