开发者

Posting comment to Particular news feed Facebook IOS Sdk

开发者 https://www.devze.com 2023-03-06 06:44 出处:网络
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

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

精彩评论

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