Facebook iOS SDK-向Facebook用户发送应用请求
|
我试图使用facebook iOS SDK通过facebook发送一个应用程序请求,我使用以下代码:
NSString *message = [[NSString alloc] initWithFormat:@\"blah blah blah\"];
NSString *data = [[NSString alloc] initWithFormat:@\"blah blah blah\"];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:message, @\"message\", data, @\"data\", nil];
[_facebook requestWithGraphPath:[NSString stringWithFormat:@\"%@/apprequests\",userID] andParams:params andHttpMethod:@\"POST\" andDelegate:self];
[message release];
[data release];
这给我以下错误:
Error: Error Domain=facebookErrDomain Code=10000 \"The operation couldn’t be completed. (facebookErrDomain error 10000.)\" UserInfo=0x788c5b0 {error=<CFBasicHash 0x788c080 [0x1bf53e0]>{type = mutable dict, count = 2,
entries =>
2 : <CFString 0x788b560 [0x1bf53e0]>{contents = \"type\"} = <CFString 0x788c3f0 [0x1bf53e0]>{contents = \"OAuthException\"}
3 : <CFString 0x788c560 [0x1bf53e0]>{contents = \"message\"} = <CFString 0x788c480 [0x1bf53e0]>{contents = \"(#200) Invalid Request: There was a problem with the parameters of the request. Body of an error/warning message. Title is: Invalid Request\"}
}
那么,有没有人成功完成此任务,或者您知道使用Facebook iOS SDK向Facebook用户发送请求的方法吗?
谢谢
没有找到相关结果
已邀请:
5 个回复
摊揉售
请不要忘记在ViewController类中首先采用FBdialogDelegate协议。
呕蹿尉
苦诫
遣莫捅炭
爆山