iphone - posting comments to facebook results in "user not visible" error -
i writing facebook app iphone, when send request post comment following error:
failed error: error domain=api.facebook.com code=210 "user not visible" userinfo=0x5a986b0 {request_args=( { key = text; value = "test comment"; }, { key = format; value = xml; }, { key = "post_id"; value = "100001297086328_132682710102963"; }, { key = "call_id"; value = 1279912620; }, { key = v; value = "1.0"; }, { key = "api_key"; value = xxxxxxxxxxxxxxxxxxxxxxx; }, { key = method; value = "facebook.stream.addcomment"; }, { key = "session_key"; value = "xxxxxxxxxxxxxxxxxxxxxxxxxx"; }, { key = sig; value = xxxxxxxxxxxxxxxxxxxxxxxxxxx; }
when attempt comment on same post same user , facebook app using test console @ http://developers.facebook.com/docs/reference/rest/stream.addcomment works fine.
my current permissions are: read_stream, publish_stream, read_friendlists
the code using request is:
-(void)postcomment:(nsstring *)comment forpost:(nsstring *)postid { nslog(@"postcomment called"); nslog(@"comment is: %@", comment); nslog(@"post id is: %@", postid); currentrequest = @"post comment"; nsdictionary *params = [nsdictionary dictionarywithobjectsandkeys: comment, @"text", postid, @"post_id", nil]; [[fbrequest requestwithdelegate:self] call:@"facebook.stream.addcomment" params:params];
}
i can "like" same post. have no idea why isn't working.
turns out answer update ios sdk classes provided facebook. new ones connect via desktop authentification access token lets use new graph api add comments.
the new sdk can found here: http://github.com/facebook/facebook-ios-sdk/
it require changes current methods, nothing complicated.
Comments
Post a Comment