我正在尝试发布一个故事,但Open Graph返回给我这个错误:domain = com.facebook.sdk,code = 5
我使用这些权限:
[NSArray arrayWithObjects: @ "status_update" @ "publish_actions" @ "publish_stream" @ "user_likes" @ "create_event", nil];
我用来创建历史的代码:
NSMutableDictionary * item = [FBGraphObject graphObject];
[Item setObject: @ "http://mysite.com.br/cardapio/6/burger-de-carne" forKey: @ "object"];
NSMutableDictionary * action = (<FBOpenGraphAction> NSMutableDictionary *) [FBGraphObject graphObject];
[Action setObject: item forKey: @ "Like"];
[FBRequestConnection startForPostWithGraphPath: @ "me/og.like" graphObject: action completionHandler: ^ (* FBRequestConnection connection, id result, NSError * error)
{ NSString * alertText;
if(! error)
{ alertText = [NSString stringWithFormat: @ "Open Graph Posted action, id:% @", [Result objectForKey: @ "id"]];
Else {
alertText = [NSString stringWithFormat: @ "error:% @ domain =, code =% d", error.domain, error.code]; }
[[[UIAlertView alloc] initWithTitle: @ "Result" message: alertText delegate: nil cancelButtonTitle: @ "Thanks!" otherButtonTitles: nil] show];
}];