我在我的代码中成功整合了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
}
}
// CODE
[_facebook requestWithGraphPath:[NSString stringWithFormat:@"/%@/feed",[defaults objectForKey:@"FBUDID"]]
andParams:variables
andHttpMethod:@"POST"
andDelegate:self];
我检查了AppID&amp;秘密密钥。
请帮忙。感谢
答案 0 :(得分: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];
使用上述代码可以完成向自己(已登录的用户)发布消息。如果有任何疑问,请告诉我。