2

我成功地在我的代码中集成了 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 和密钥。

请帮忙。谢谢

4

1 回答 1

3
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];

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

于 2012-10-23T07:30:26.823 回答