如何使用新的Facebook iOS SDK“喜欢”某个页面? (http://
github.com/facebook/facebook-ios-sdk)
我目前正在尝试这样做:
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:[_facebook accessToken],@"access_token",nil]; [_facebook requestWithGraPHPath:@"cocacola/likes" andParams:dict andHttpMethod:@"POST" andDelegate:self];
这不起作用.当我NSLog([错误描述]);我明白了:
Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0x6a50160 {error=<CFBasicHash 0x6a4fd40 [0x250b380]>{type = mutable dict,count = 2,entries => 2 : <CFString 0x6a4fc80 [0x250b380]>{contents = "type"} = <CFString 0x6a50000 [0x250b380]>{contents = "OAuthException"} 3 : <CFString 0x6a500e0 [0x250b380]>{contents = "message"} = <CFString 0x6a50080 [0x250b380]>{contents = "(#3) Application must be on whitelist"} } }
我已经在高级设置下将我的IP(我的计算机的IP地址,因为我从模拟器运行,在访问www.whatismyip.com时获得)添加到我的Facebook应用程序的白名单中的白名单.
谢谢!
特里斯坦
解决方法
它看起来像一个众所周知但未经证实的错误:
http://bugs.developers.facebook.net/show_bug.cgi?id=10714.