开发者

Posting comment to Particular news feed Facebook IOS Sdk

I have been using following code to add comment to particular newsfeed id though I have authorized my app with al开发者_开发技巧l the permissions required which are

@"read_stream",@"offline_access",@"publish_stream",@"share_item"

      NSMutableDictionary *params1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"comment added thorugh iphone", @"message", nil];
      [_facebook requestWithMethodName:@"comments/NEWS_ID"
                             andParams:params1
                         andHttpMethod:@"POST"
                           andDelegate:self];

Result I receive is The operation couldn’t be completed. (facebookErrDomain error 3.)

What am I doing wrong here ? Please help me.


You can use

  NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"Your Comment Text.", @"text",@"NEWs_FEED_ID", @"object_id",nil];
  [_facebook requestWithMethodName:@"comments.add" andParams:params andHttpMethod:@"POST" andDelegate:self];

Hope it helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜