中易网

求解答新浪微博api报错

答案:2  悬赏:10  
解决时间 2021-01-18 01:59
  • 提问者网友:嗝是迷路的屁
  • 2021-01-17 03:50
求解答新浪微博api报错
最佳答案
  • 二级知识专家网友:逐風
  • 2021-01-17 04:31
原因分析:
sdk版本不符,文件内所写的版本过低。
导入的jar包是双份sdk高版本出现这个问题。官方Demo不用导入weibo.sdk.android.sso.jar这个包。在工程weibo.sdk.android.sso.demo中已经包含了weibo.sdk.android.sso.jar的源代码。
默认编码格式与文件格式不符。
demo里有个apiBtn代码多余。

解决方法:
修改工程目录下的project.properties文件里的内容target=android-4数字改成你机器里装过的android SDK版本就可以了。另外还有修改AndroidManifest.xml里的android:minSdkVersion="4"
删掉libs下的weibo.sdk.android.sso.jar文件。
在工程文件夹上右键选择Properties,然后再Resources下的text file encoding选择other->UTF-8。
注释apiBtn.setVisibility(View.VISIBLE)。
参考资料
ITEYE编程网.ITEYE编程网[引用时间2017-12-31]
全部回答
  • 1楼网友:山有枢
  • 2021-01-17 04:51
系统级错误代码
错误代码错误信息详细描述
10001System error系统错误
10002Service unavailable服务暂停
10003Remote service error远程服务错误
10004IP limitIP限制不能请求该资源
10005Permission denied, need a high level appkey该资源需要appkey拥有授权
10006Source paramter (appkey) is missing缺少source (appkey) 参数
10007Unsupport mediatype (%s)不支持的MediaType (%s)
10008Param error, see doc for more info参数错误,请参考API文档
10009Too many pending tasks, system is busy任务过多,系统繁忙
10010Job expired任务超时
10011RPC errorRPC错误
10012Illegal request非法请求
10013Invalid weibo user不合法的微博用户
10014Insufficient app permissions应用的接口访问权限受限
10016Miss required parameter (%s) , see doc for more info缺失必选参数 (%s),请参考API文档
10017Parameter (%s)’s value invalid, expect (%s) , but get (%s) , see doc for more info参数值非法,需为 (%s),实际为 (%s),请参考API文档
10018Request body length over limit请求长度超过限制
10020Request api not found接口不存在
10021HTTP method is not suported for this request请求的HTTP METHOD不支持,请检查是否选择了正确的POST/GET方式
10022IP requests out of rate limitIP请求频次超过上限
10023User requests out of rate limit用户请求频次超过上限
10024User requests for (%s) out of rate limit用户请求特殊接口 (%s) 频次超过上限
服务级错误代码
错误代码错误信息详细描述
20001IDs is nullIDs参数为空
20002Uid parameter is nullUid参数为空
20003User does not exists用户不存在
20005Unsupported image type, only suport JPG, GIF, PNG不支持的图片类型,仅仅支持JPG、GIF、PNG
20006Image size too large图片太大
20007Does multipart has image请确保使用multpart上传图片
20008Content is null内容为空
20009IDs is too manyIDs参数太长了
20012Text too long, please input text less than 140 characters输入文字太长,请确认不超过140个字符
20013Text too long, please input text less than 300 characters输入文字太长,请确认不超过300个字符
20014Param is error, please try again安全检查参数有误,请再调用一次
20015Account or ip or app is illgal, can not continue账号、IP或应用非法,暂时无法完成此操作
20016Out of limit发布内容过于频繁
20017Repeat content提交相似的信息
20018Contain illegal website包含非法网址
20019Repeat conetnt提交相同的信息
20020Contain advertising包含广告信息
20021Content is illegal包含非法内容
20022Your ip’s behave in a comic boisterous or unruly manner此IP地址上的行为异常
20031Test and verify需要验证码
20032Update success, while server slow now, please wait 1-2 minutes发布成功,目前服务器可能会有延迟,请耐心等待1-2分钟
---
20101Target weibo does not exist不存在的微博
20102Not your own weibo不是你发布的微博
20103Can’t repost yourself weibo不能转发自己的微博
20104Illegal weibo不合法的微博
20109Weibo id is null微博ID为空
20
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息