新浪OAuth網站登陸連接,請求access_token時遇到21323 miss client id or secret 的解決方案

報錯信息

error":"invalid_request","error_code":21323,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"miss client id or secret

解決方案:

參照文檔:http://open.weibo.com/wiki/OAuth2/access_token 雖然寫的是 post'提交 但是這裏的post的寫法應該是

https://api.weibo.com/oauth2/access_token?client_id={0}&client_secret={1}&grant_type=authorization_code&code={2}&redirect_uri={3} 

提交的data應該爲空


類似我這篇文章中的寫法

http://blog.csdn.net/u011650048/article/details/51777946   文章中的SinaApi中的get_access_token的寫法  


哈哈 問題完美解決了


參照博客:http://www.cnblogs.com/kvspas/archive/2011/12/30/sina-oauth-21323.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章