简体   繁体   中英

message:(#200) App does not have permission to make this call in ios application using facebook sdk

I want to like and comment in my iOS application.But the problem is whenever I call my API the response comes in the form of this `error:message:(#200)'. App does not have permission to make this call and sometimes it will give input parameter is required.The permissions i give are 'basic_info','email','user_likes' and 'read_stream'. I am passing object id and access token in my like and comment API.

Like API code:

NSString *theWholeUrl = [NSString stringWithFormat:@"https://graph.facebook.com/%@/likes?access_token=%@",self.friendId,[FBSession activeSession].accessTokenData.accessToken];

NSLog(@"Value of theWholeUrl%@",theWholeUrl);
NSURL *facebookUrl = [NSURL URLWithString:theWholeUrl];

NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:facebookUrl];
[req setHTTPMethod:@"POST"];

NSURLResponse *response;
NSError *err;
NSData *responseData = [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:&err];
NSString *content = [NSString stringWithUTF8String:[responseData bytes]];

您需要publish_actions权限,才能通过API以编程方式喜欢和评论内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM