【问题标题】:Facebook wall post error : OAuthExceptionFacebook 墙贴错误:OAuthException
【发布时间】:2012-10-23 06:08:42
【问题描述】:

我成功地在我的代码中集成了 facebook 登录。现在想在墙上发帖。

错误如下:

FBRequest didFailWithError:The operation couldn’t be completed. (facebookErrDomain error 10000.) Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0xeaf9870 {error=<CFBasicHash 0xeaf9770 [0x20eb400]>{type = mutable dict, count = 3,
entries =>
    2 : <CFString 0xead54f0 [0x20eb400]>{contents = "type"} = <CFString 0xead6470 [0x20eb400]>{contents = "OAuthException"}
    3 : <CFString 0xead4610 [0x20eb400]>{contents = "message"} = <CFString 0xead4660 [0x20eb400]>{contents = "(#200) This API call requires a valid app_id."}
    6 : <CFString 0xead4180 [0x20eb400]>{contents = "code"} = 200
}
}

//代码

[_facebook requestWithGraphPath:[NSString stringWithFormat:@"/%@/feed",[defaults objectForKey:@"FBUDID"]] 
                          andParams:variables 
                      andHttpMethod:@"POST" 
                        andDelegate:self];

我已经检查了 AppID 和密钥。

请帮忙。谢谢

【问题讨论】:

  • 只能是appid相关的问题。请检查 facebook 本身是否返回 appid 问题。尝试创建另一个应用程序并检查该 appid。或者把你的 appid 也放在这里,这样我们就可以检查那个 app id。
  • 我已经检查了另一个 appid(新创建的)。但得到相同的回应。是我的问题还是fb? “请检查 facebook 本身返回 appid 问题”是什么意思?
  • Facebook 从不撒谎。你可以分享你的appid吗?我可以检查。
  • 现在我收到此错误:您请求的某些别名不存在:(null)
  • 您的代码有问题。我曾尝试在我们的一个帐户中发布消息。您的应用运行良好。

标签: iphone xcode facebook post facebook-wall


【解决方案1】:
NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease];
[params setObject:@"status" forKey:@"type"];
[params setObject:@"Write your message here to post" forKey:@"message"];
[_facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];

可以使用上面的代码向自己(已登录的用户)墙发布消息。如有任何疑问,请告诉我。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多