繁体   English   中英

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

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

我想在我的iOS应用程序中喜欢并发表评论。但是问题是,每当我调用API时,响应都会以这种形式出现:“ error:message:(#200)”。 应用没有权限进行此调用,有时它会要求输入参数。我提供的权限为“ basic_info”,“ email”,“ user_likes”和“ read_stream”。 我在“喜欢和评论” API中传递对象ID和访问令牌。

类似于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