【ShareSDK社會化分享】新浪微博分享網絡圖片問題

新浪通過審覈後分享網絡圖片時報錯

    {"error":"Insufficient apppermissions!","error_code":10014,"request":"/2/statuses/upload_url_text.json"};

浪微博支持分享網絡圖片,但是這個需要高級微博寫入權限,因此如果您需要分享網絡圖片,請申請權限以後,將圖片Url設置給

SinaWeibo.ShareParams.setImageUrl(imageUrl)即可。下面詳細描述一下申請此權限的方法:

    1)進入您的應用詳情,並選擇“接口管理”—“申請權限”。

    2)在右側展開的頁面中展開“微博高級寫入接口”,會看到“statuses/upload_url_text”。勾選分組左側的複選框。

    3)滾動頁面到底部,填寫申請理由,然後“提交申請”。


如圖所示:


新浪微博API錯誤代碼說明對照表

直入正文,微博平臺錯誤代碼分爲兩種:系統級錯誤代碼(以數字1開頭)、:服務級錯誤代碼(以數字2開頭),錯誤代碼以JSON格式返回給客戶端的。如下所示:

{	
"request" : "/statuses/update.json",
"error_code" : "10006",
"error" : "Source paramter (appkey) is missing."
}

下面分別是系統級錯誤代碼與服務級錯誤代碼的詳細對照表(提示:使用Ctrl+F組合鍵查詢錯誤碼更方便)

系統級錯誤代碼

錯誤代碼 錯誤信息 詳細描述
10001 System error 系統錯誤
10002 Service unavailable 服務暫停
10003 Remote service error 遠程服務錯誤
10004 IP limit IP限制不能請求該資源
10005 Permission denied, need a high level appkey 該資源需要appkey擁有授權
10006 Source paramter (appkey) is missing 缺少source (appkey) 參數
10007 Unsupport mediatype (%s) 不支持的MediaType (%s)
10008 Param error, see doc for more info 參數錯誤,請參考API文檔
10009 Too many pending tasks, system is busy 任務過多,系統繁忙
10010 Job expired 任務超時
10011 RPC error RPC錯誤
10012 Illegal request 非法請求
10013 Invalid weibo user 不合法的微博用戶
10014 Insufficient app permissions 應用的接口訪問權限受限
10016 Miss required parameter (%s) , see doc for more info 缺失必選參數 (%s),請參考API文檔
10017 Parameter (%s)’s value invalid, expect (%s) , but get (%s) , see doc for more info 參數值非法,需爲 (%s),實際爲 (%s),請參考API文檔
10018 Request body length over limit 請求長度超過限制
10020 Request api not found 接口不存在
10021 HTTP method is not suported for this request 請求的HTTP METHOD不支持,請檢查是否選擇了正確的POST/GET方式
10022 IP requests out of rate limit IP請求頻次超過上限
10023 User requests out of rate limit 用戶請求頻次超過上限
10024 User requests for (%s) out of rate limit 用戶請求特殊接口 (%s) 頻次超過上限

服務級錯誤代碼

錯誤代碼 錯誤信息 詳細描述
20001 IDs is null IDs參數爲空
20002 Uid parameter is null Uid參數爲空
20003 User does not exists 用戶不存在
20005 Unsupported image type, only suport JPG, GIF, PNG 不支持的圖片類型,僅僅支持JPG、GIF、PNG
20006 Image size too large 圖片太大
20007 Does multipart has image 請確保使用multpart上傳圖片
20008 Content is null 內容爲空
20009 IDs is too many IDs參數太長了
20012 Text too long, please input text less than 140 characters 輸入文字太長,請確認不超過140個字符
20013 Text too long, please input text less than 300 characters 輸入文字太長,請確認不超過300個字符
20014 Param is error, please try again 安全檢查參數有誤,請再調用一次
20015 Account or ip or app is illgal, can not continue 賬號、IP或應用非法,暫時無法完成此操作
20016 Out of limit 發佈內容過於頻繁
20017 Repeat content 提交相似的信息
20018 Contain illegal website 包含非法網址
20019 Repeat conetnt 提交相同的信息
20020 Contain advertising 包含廣告信息
20021 Content is illegal 包含非法內容
20022 Your ip’s behave in a comic boisterous or unruly manner 此IP地址上的行爲異常
20031 Test and verify 需要驗證碼
20032 Update success, while server slow now, please wait 1-2 minutes 發佈成功,目前服務器可能會有延遲,請耐心等待1-2分鐘
- - -
20101 Target weibo does not exist 不存在的微博
20102 Not your own weibo 不是你發佈的微博
20103 Can’t repost yourself weibo 不能轉發自己的微博
20104 Illegal weibo 不合法的微博
20109 Weibo id is null 微博ID爲空
20111 Repeated weibo text 不能發佈相同的微博
- - -
20201 Target weibo comment does not exist 不存在的微博評論
20202 Illegal comment 不合法的評論
20203 Not your own comment 不是你發佈的評論
20204 Comment id is null 評論ID爲空
- - -
20301 Can’t send direct message to user who is not your follower 不能給不是你粉絲的人發私信
20302 Illegal direct message 不合法的私信
20303 Not your own direct message 不是屬於你的私信
20305 Direct message does not exist 不存在的私信
20306 Repeated direct message text 不能發佈相同的私信
20307 Illegal direct message id 非法的私信ID
- - -
20401 Domain not exist 域名不存在
20402 Wrong verifier Verifier錯誤
- - -
20501 Source_user or target_user does not exists 參數source_user或者target_user的用戶不存在
20502 Please input right target user id or screen_name 必須輸入目標用戶id或者screen_name
20503 Need you follo
w user_id
參數user_id必須是你關注的用戶
20504 Can not follow yourself 你不能關注自己
20505 Social graph updates out of rate limit 加關注請求超過上限
20506 Already followed 已經關注此用戶
20507 Verification code is needed 需要輸入驗證碼
20508 According to user privacy settings,you can not do this 根據對方的設置,你不能進行此操作
20509 Private friend count is out of limit 悄悄關注個數到達上限
20510 Not private friend 不是悄悄關注人
20511 Already followed privately 已經悄悄關注此用戶
20512 Please delete the user from you blacklist before you follow the user 你已經把此用戶加入黑名單,加關注前請先解除
20513 Friend count is out of limit! 你的關注人數已達上限
20521 Hi Superman, you have concerned a lot of people, have a think of how to make other people concern about you! ! If you have any questions, please contact Sina customer service: 400 690 0000 hi 超人,你今天已經關注很多嘍,接下來的時間想想如何讓大家都來關注你吧!如有問題,請聯繫新浪客服:400 690 0000
20522 Not followed 還未關注此用戶
20523 Not followers 還不是粉絲
20524 Hi Superman, you have cancelled concerning a lot of people, have a think of how to make other people concern about you! ! If you have any questions, please contact Sina customer service: 400 690 0000 hi 超人,你今天已經取消關注很多嘍,接下來的時間想想如何讓大家都來關注你吧!如有問題,請聯繫新浪客服:400 690 0000
- - -
20601 List name too long, please input text less than 10 characters 列表名太長,請確保輸入的文本不超過10個字符
20602 List description too long, please input text less than 70 characters 列表描敘太長,請確保輸入的文本不超過70個字符
20603 List does not exists 列表不存在
20604 Only the owner has the authority 不是列表的所屬者
20605 Illegal list name or list description 列表名或描敘不合法
20606 Object already exists 記錄已存在
20607 DB error, please contact the administator 數據庫錯誤,請聯繫系統管理員
20608 List name duplicate 列表名衝突
20610 Does not support private list 目前不支持私有分組
20611 Create list error 創建列表失敗
20612 Only support private list 目前只支持私有分組
20613 You hava subscriber too many lists 訂閱列表達到上限
20614 Too many lists, see doc for more info 創建列表達到上限,請參考API文檔
20615 Too many members, see doc for more info 列表成員上限,請參考API文檔
- - -
20701 Repeated tag text 不能提交相同的收藏標籤
20702 Tags is too many 最多兩個收藏標籤
20703 Illegal tag name 收藏標籤名不合法
- - -
20801 Trend_name is null 參數trend_name是空值
20802 Trend_id is null 參數trend_id是空值
- - -
20901 Error: in blacklist 錯誤:已經添加了黑名單
20902 Error: Blacklist limit has been reached. 錯誤:已達到黑名單上限
20903 Error: System administrators can not be added to the blacklist. 錯誤:不能添加系統管理員爲黑名單
20904 Error: Can not add yourself to the blacklist. 錯誤:不能添加自己爲黑名單
20905 Error: not in blacklist 錯誤:不在黑名單中
- - -
21001 Tags parameter is null 標籤參數爲空
21002 Tags name too long 標籤名太長,請確保每個標籤名不超過14個字符
- - -
21101 Domain parameter is error 參數domain錯誤
21102 The phone number has been used 該手機號已經被使用
21103 The account has bean bind phone 該用戶已經綁定手機
21104 Wrong verifier Verifier錯誤
- - -
21301 Auth faild 認證失敗
21302 Username or password error 用戶名或密碼不正確
21303 Username and pwd auth out of rate limit 用戶名密碼認證超過請求限制
21304 Version rejected 版本號錯誤
21305 Parameter absent 缺少必要的參數
21306 Parameter rejected OAuth參數被拒絕
21307 Timestamp refused 時間戳不正確
21308 Nonce used 參數nonce已經被使用
21309 Signature method rejected 簽名算法不支持
21310<
/td>
Signature invalid 簽名值不合法
21311 Consumer key unknown 參數consumer_key不存在
21312 Consumer key refused 參數consumer_key不合法
21313 Miss consumer key 參數consumer_key缺失
21314 Token used Token已經被使用
21315 Token expired Token已經過期
21316 Token revoked Token不合法
21317 Token rejected Token不合法
21318 Verifier fail Pin碼認證失敗
21319 Accessor was revoked 授權關係已經被解除
21320 OAuth2 must use https 使用OAuth2必須使用https
21321 Applications over the unaudited use restrictions 未審覈的應用使用人數超過限制
21327 Expired token token過期
- - -
21501 Urls is null 參數urls是空的
21502 Urls is too many 參數urls太多了
21503 IP is null IP是空值
21504 Url is null 參數url是空值
- - -
21601 Manage notice error, need auth 需要系統管理員的權限
21602 Contains forbid world 含有敏感詞
21603 Applications send notice over the restrictions 通知發送達到限制
- - -
21701 Manage remind error, need auth 提醒失敗,需要權限
21702 Invalid category 無效分類
21703 Invalid status 無效狀態碼
- - -
21901 Geo code input error 地理信息輸入錯誤


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