简体   繁体   English

消息:(#200)应用没有权限使用Facebook SDK在ios应用程序中进行此调用

[英]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)'. 我想在我的iOS应用程序中喜欢并发表评论。但是问题是,每当我调用API时,响应都会以这种形式出现:“ 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'. 应用没有权限进行此调用,有时它会要求输入参数。我提供的权限为“ basic_info”,“ email”,“ user_likes”和“ read_stream”。 I am passing object id and access token in my like and comment API. 我在“喜欢和评论” API中传递对象ID和访问令牌。

Like API code: 类似于API代码:

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以编程方式喜欢和评论内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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