【ShareSDK社会化分享】新浪微博分享网络图片问题

2024-05-16 06:38

本文主要是介绍【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组合键查询错误码更方便)

系统级错误代码

错误代码 错误信息 详细描述
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个字符
20013 Text 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为空
20111Repeated weibo text不能发布相同的微博
---
20201Target weibo comment does not exist不存在的微博评论
20202Illegal comment不合法的评论
20203Not your own comment不是你发布的评论
20204Comment id is null评论ID为空
---
20301Can’t send direct message to user who is not your follower不能给不是你粉丝的人发私信
20302Illegal direct message不合法的私信
20303Not your own direct message不是属于你的私信
20305Direct message does not exist不存在的私信
20306Repeated direct message text不能发布相同的私信
20307Illegal direct message id非法的私信ID
---
20401Domain not exist域名不存在
20402Wrong verifierVerifier错误
---
20501Source_user or target_user does not exists参数source_user或者target_user的用户不存在
20502Please input right target user id or screen_name必须输入目标用户id或者screen_name
20503Need you follo
w user_id
参数user_id必须是你关注的用户
20504Can not follow yourself你不能关注自己
20505Social graph updates out of rate limit加关注请求超过上限
20506Already followed已经关注此用户
20507Verification code is needed需要输入验证码
20508According to user privacy settings,you can not do this根据对方的设置,你不能进行此操作
20509Private friend count is out of limit悄悄关注个数到达上限
20510Not private friend不是悄悄关注人
20511Already followed privately已经悄悄关注此用户
20512Please delete the user from you blacklist before you follow the user你已经把此用户加入黑名单,加关注前请先解除
20513Friend count is out of limit!你的关注人数已达上限
20521Hi 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 0000hi 超人,你今天已经关注很多喽,接下来的时间想想如何让大家都来关注你吧!如有问题,请联系新浪客服:400 690 0000
20522Not followed还未关注此用户
20523Not followers还不是粉丝
20524Hi 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 0000hi 超人,你今天已经取消关注很多喽,接下来的时间想想如何让大家都来关注你吧!如有问题,请联系新浪客服:400 690 0000
---
20601List name too long, please input text less than 10 characters列表名太长,请确保输入的文本不超过10个字符
20602List description too long, please input text less than 70 characters列表描叙太长,请确保输入的文本不超过70个字符
20603List does not exists列表不存在
20604Only the owner has the authority不是列表的所属者
20605Illegal list name or list description列表名或描叙不合法
20606Object already exists记录已存在
20607DB error, please contact the administator数据库错误,请联系系统管理员
20608List name duplicate列表名冲突
20610Does not support private list目前不支持私有分组
20611Create list error创建列表失败
20612Only support private list目前只支持私有分组
20613You hava subscriber too many lists订阅列表达到上限
20614Too many lists, see doc for more info创建列表达到上限,请参考API文档
20615Too many members, see doc for more info列表成员上限,请参考API文档
---
20701Repeated tag text不能提交相同的收藏标签
20702Tags is too many最多两个收藏标签
20703Illegal tag name收藏标签名不合法
---
20801Trend_name is null参数trend_name是空值
20802 Trend_id is null参数trend_id是空值
---
20901Error: in blacklist错误:已经添加了黑名单
20902Error: Blacklist limit has been reached.错误:已达到黑名单上限
20903Error: System administrators can not be added to the blacklist.错误:不能添加系统管理员为黑名单
20904Error: Can not add yourself to the blacklist.错误:不能添加自己为黑名单
20905Error: not in blacklist错误:不在黑名单中
---
21001Tags parameter is null标签参数为空
21002Tags name too long标签名太长,请确保每个标签名不超过14个字符
---
21101Domain parameter is error参数domain错误
21102The phone number has been used该手机号已经被使用
21103The account has bean bind phone该用户已经绑定手机
21104Wrong verifierVerifier错误
---
21301Auth faild认证失败
21302Username or password error用户名或密码不正确
21303Username and pwd auth out of rate limit用户名密码认证超过请求限制
21304Version rejected版本号错误
21305Parameter absent缺少必要的参数
21306Parameter rejectedOAuth参数被拒绝
21307Timestamp refused时间戳不正确
21308Nonce used参数nonce已经被使用
21309Signature method rejected签名算法不支持
21310<
/td>
Signature invalid签名值不合法
21311Consumer key unknown参数consumer_key不存在
21312Consumer key refused参数consumer_key不合法
21313Miss consumer key参数consumer_key缺失
21314Token usedToken已经被使用
21315Token expiredToken已经过期
21316Token revokedToken不合法
21317Token rejectedToken不合法
21318Verifier failPin码认证失败
21319Accessor was revoked授权关系已经被解除
21320OAuth2 must use https使用OAuth2必须使用https
21321Applications over the unaudited use restrictions未审核的应用使用人数超过限制
21327Expired tokentoken过期
---
21501Urls is null参数urls是空的
21502Urls is too many参数urls太多了
21503IP is nullIP是空值
21504Url is null参数url是空值
---
21601Manage notice error, need auth需要系统管理员的权限
21602Contains forbid world含有敏感词
21603Applications send notice over the restrictions通知发送达到限制
---
21701Manage remind error, need auth提醒失败,需要权限
21702Invalid category无效分类
21703 Invalid status无效状态码
---
21901Geo code input error地理信息输入错误

这篇关于【ShareSDK社会化分享】新浪微博分享网络图片问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/994158

相关文章

解读为什么@Autowired在属性上被警告,在setter方法上不被警告问题

《解读为什么@Autowired在属性上被警告,在setter方法上不被警告问题》在Spring开发中,@Autowired注解常用于实现依赖注入,它可以应用于类的属性、构造器或setter方法上,然... 目录1. 为什么 @Autowired 在属性上被警告?1.1 隐式依赖注入1.2 IDE 的警告:

解决java.lang.NullPointerException问题(空指针异常)

《解决java.lang.NullPointerException问题(空指针异常)》本文详细介绍了Java中的NullPointerException异常及其常见原因,包括对象引用为null、数组元... 目录Java.lang.NullPointerException(空指针异常)NullPointer

Android开发中gradle下载缓慢的问题级解决方法

《Android开发中gradle下载缓慢的问题级解决方法》本文介绍了解决Android开发中Gradle下载缓慢问题的几种方法,本文给大家介绍的非常详细,感兴趣的朋友跟随小编一起看看吧... 目录一、网络环境优化二、Gradle版本与配置优化三、其他优化措施针对android开发中Gradle下载缓慢的问

Python中常用的四种取整方式分享

《Python中常用的四种取整方式分享》在数据处理和数值计算中,取整操作是非常常见的需求,Python提供了多种取整方式,本文为大家整理了四种常用的方法,希望对大家有所帮助... 目录引言向零取整(Truncate)向下取整(Floor)向上取整(Ceil)四舍五入(Round)四种取整方式的对比综合示例应

如何使用CSS3实现波浪式图片墙

《如何使用CSS3实现波浪式图片墙》:本文主要介绍了如何使用CSS3的transform属性和动画技巧实现波浪式图片墙,通过设置图片的垂直偏移量,并使用动画使其周期性地改变位置,可以创建出动态且具有波浪效果的图片墙,同时,还强调了响应式设计的重要性,以确保图片墙在不同设备上都能良好显示,详细内容请阅读本文,希望能对你有所帮助...

关于Nginx跨域问题及解决方案(CORS)

《关于Nginx跨域问题及解决方案(CORS)》文章主要介绍了跨域资源共享(CORS)机制及其在现代Web开发中的重要性,通过Nginx,可以简单地解决跨域问题,适合新手学习和应用,文章详细讲解了CO... 目录一、概述二、什么是 CORS?三、常见的跨域场景四、Nginx 如何解决 CORS 问题?五、基

MySQL安装时initializing database失败的问题解决

《MySQL安装时initializingdatabase失败的问题解决》本文主要介绍了MySQL安装时initializingdatabase失败的问题解决,文中通过图文介绍的非常详细,对大家的学... 目录问题页面:解决方法:问题页面:解决方法:1.勾选红框中的选项:2.将下图红框中全部改为英

Python脚本实现图片文件批量命名

《Python脚本实现图片文件批量命名》这篇文章主要为大家详细介绍了一个用python第三方库pillow写的批量处理图片命名的脚本,文中的示例代码讲解详细,感兴趣的小伙伴可以了解下... 目录前言源码批量处理图片尺寸脚本源码GUI界面源码打包成.exe可执行文件前言本文介绍一个用python第三方库pi

Python爬虫selenium验证之中文识别点选+图片验证码案例(最新推荐)

《Python爬虫selenium验证之中文识别点选+图片验证码案例(最新推荐)》本文介绍了如何使用Python和Selenium结合ddddocr库实现图片验证码的识别和点击功能,感兴趣的朋友一起看... 目录1.获取图片2.目标识别3.背景坐标识别3.1 ddddocr3.2 打码平台4.坐标点击5.图

Nginx启动失败:端口80被占用问题的解决方案

《Nginx启动失败:端口80被占用问题的解决方案》在Linux服务器上部署Nginx时,可能会遇到Nginx启动失败的情况,尤其是错误提示bind()to0.0.0.0:80failed,这种问题通... 目录引言问题描述问题分析解决方案1. 检查占用端口 80 的进程使用 netstat 命令使用 ss