|
参照的百度翻译API
http://developer.baidu.com/wiki/ ... 7%BF%BB%E8%AF%91API
使用开发助手测试的
get方式是使用成功了,
http://openapi.baidu.com/public/ ... =%E6%A1%8C%E9%9D%A2,%E4%BD%A0%E5%A5%BD%0A%E4%BD%A0%E5%A5%BD&from=zh&to=en
这个返回 {"from":"zh","to":"en","trans_result":[{"src":"\u684c\u9762,\u4f60\u597d","dst":"Desktop, hello"},{"src":"\u4f60\u597d","dst":"Hello"}]}
但是post不行啊,
url = http://openapi.baidu.com/public/2.0/bmt/translate
postdata中填的 client_id=58Z0QwRLvUZfD9y7YFTNFCLD&q=today&from=auto&to=auto
{"error_code":"52003","error_msg":"UNAUTHORIZED USER","from":null,"to":null,"monLang":"zh","query":null}
返回错误,请问哪里错了啊
|
|