Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 将评论发布到facebook结果中;“用户不可见”;错误_Iphone_Objective C_Facebook - Fatal编程技术网

Iphone 将评论发布到facebook结果中;“用户不可见”;错误

Iphone 将评论发布到facebook结果中;“用户不可见”;错误,iphone,objective-c,facebook,Iphone,Objective C,Facebook,我正在为iphone编写一个facebook应用程序,但是当我发送一个发布评论的请求时,我得到以下错误: failed with error: Error Domain=api.facebook.com Code=210 "User not visible" UserInfo=0x5a986b0 {request_args=( { key = text; value = "Test comment"; }, { key = format; valu

我正在为iphone编写一个facebook应用程序,但是当我发送一个发布评论的请求时,我得到以下错误:

failed with error: Error Domain=api.facebook.com Code=210 "User not visible" UserInfo=0x5a986b0 {request_args=(
    {
    key = text;
    value = "Test comment";
},
    {
    key = format;
    value = XML;
},
    {
    key = "post_id";
    value = "100001297086328_132682710102963";
},
    {
    key = "call_id";
    value = 1279912620;
},
    {
    key = v;
    value = "1.0";
},
    {
    key = "api_key";
    value = XXXXXXXXXXXXXXXXXXXXXXX;
},
    {
    key = method;
    value = "facebook.stream.addComment";
},
    {
    key = "session_key";
    value = "XXXXXXXXXXXXXXXXXXXXXXXXXX";
},
    {
    key = sig;
    value = XXXXXXXXXXXXXXXXXXXXXXXXXXX;
}
当我试图用同一个用户和facebook应用程序在同一篇文章上发表评论时,使用测试控制台就可以了

我当前的权限是:阅读流、发布流、阅读好友列表

我用于请求的代码是:

-(void)postComment:(NSString *)comment forPost:(NSString *)postID {
NSLog(@"postComment called");
NSLog(@"comment is: %@", comment);
NSLog(@"post ID is: %@", postID);


currentRequest = @"post comment";

NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                        comment, @"text",
                        postID, @"post_id",
                        nil];

[[FBRequest requestWithDelegate:self] call:@"facebook.stream.addComment" params:params];
}


我可以“喜欢”同一个帖子。我不知道这为什么不起作用。

结果是更新Facebook提供的iOS SDK类。新的图形API通过桌面身份验证与访问令牌连接,该令牌允许您使用新的图形API添加注释

新SDK可在以下位置找到:


它需要对当前方法进行一些更改,但不会太复杂。

检查两个用户是否在彼此的好友列表中


您可能多次将数据添加到缓存并从中轮询数据。。。它可能包含旧数据并抛出此类错误。

如果不是这样,那么它也不会在控制台中工作。