【发布时间】:2012-06-18 02:53:12
【问题描述】:
嘿,我刚刚从http://code.google.com/p/gdata-objectivec-client/source/checkout 下载并构建了 youtube 示例项目,应用程序构建良好,我已经输入了客户端 ID 和密码。然后,当我使用我的 youtube 帐户登录并单击“允许”按钮时,我收到此错误
Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x6a03a350 {data=<7b0a2020 22657272 6f722220 3a202269 6e76616c 69645f63 6c69656e 74220a7d>, json=<CFBasicHash 0x6a01b6b0 [0xac0251a0]>{type = mutable dict, count = 1,
entries =>
2 : <CFString 0x6a01b720 [0xac0251a0]>{contents = "error"} = <CFString 0x6a054b90 [0xac0251a0]>{contents = "invalid_client"}
或来自 xcode 日志:
2012-06-15 10:49:30.627 YouTubeSample[976:b03] Error Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x6980d2c0 {data=<7b0a2020 22657272 6f722220 3a202269 6e76616c 69645f63 6c69656e 74220a7d>}
Error data:
{
error = "invalid_client";
}
我已尝试创建并输入新的客户端 ID 以供使用。 看起来秘密没有正确发送,因为如果我故意破坏它甚至将其留空,我会得到相同的结果。
有什么建议吗?
【问题讨论】:
-
我如何获得客户端 ID..如果你已经成功完成了 GDATA API,那么请分享你的示例代码。
-
我有时也有这个错误。然后它在几分钟后神奇地工作。好像是连接问题。到目前为止还没有找到解决方案
标签: objective-c youtube google-api-client