HBuilderX

HBuilderX

极客开发工具
uni-app

uni-app

开发一次,多端覆盖
uniCloud

uniCloud

云开发平台
HTML5+

HTML5+

增强HTML5的功能体验
MUI

MUI

上万Star的前端框架

WebSocket 问题总结

WEBSOCKET

推送,IM,总要遇到WebSocket支持的问题。
IOS默认就支持了, 但是Android据说4.4 以下的WebView是不支持WebSocket的。

目前看到的可行的解决方案:

  1. 长轮询workaround: socket.io
  2. Server辅助Socket: sockjs
  3. phonegap 的WebSocket插件 websocket-android-phonegap

看起来只有3号方案靠谱, 有时间把这个移植到Dcloud平台吧。

还有没有其他好的方案? 期待官方出手解决...

继续阅读 »

推送,IM,总要遇到WebSocket支持的问题。
IOS默认就支持了, 但是Android据说4.4 以下的WebView是不支持WebSocket的。

目前看到的可行的解决方案:

  1. 长轮询workaround: socket.io
  2. Server辅助Socket: sockjs
  3. phonegap 的WebSocket插件 websocket-android-phonegap

看起来只有3号方案靠谱, 有时间把这个移植到Dcloud平台吧。

还有没有其他好的方案? 期待官方出手解决...

收起阅读 »

关于打包下载下来是以前的老包的情况

打包下载 云端打包 打包

最近有开发者反映下载下来的包是以前的老包。这个时候打开浏览器看下下载地址,如果不是build.clouddn.com,而是其它域名或者IP地址,可以肯定你们的下载请求被所在网络缓存或者被运营商劫持了。可以通过以下情况解决:
1、修改dns为一些公共dns,如百度公共dns:180.76.76.76或者阿里公共dns:223.5.5.5,然后重启电脑(chrome等浏览器有连接复用,需要重启清空),看是否能够正常下载。
2、联系负责网络的同事,看下公司是不是通过了squid等代理进行上网,上网过程是否有缓存,然后让他们修改缓存策略。
3、联系所在的网络运营商的客服,提供非正常的域名和IP地址,让他们确认是否缓存或者劫持。

以上三种方法还没解决,再联系DCloud客服。

继续阅读 »

最近有开发者反映下载下来的包是以前的老包。这个时候打开浏览器看下下载地址,如果不是build.clouddn.com,而是其它域名或者IP地址,可以肯定你们的下载请求被所在网络缓存或者被运营商劫持了。可以通过以下情况解决:
1、修改dns为一些公共dns,如百度公共dns:180.76.76.76或者阿里公共dns:223.5.5.5,然后重启电脑(chrome等浏览器有连接复用,需要重启清空),看是否能够正常下载。
2、联系负责网络的同事,看下公司是不是通过了squid等代理进行上网,上网过程是否有缓存,然后让他们修改缓存策略。
3、联系所在的网络运营商的客服,提供非正常的域名和IP地址,让他们确认是否缓存或者劫持。

以上三种方法还没解决,再联系DCloud客服。

收起阅读 »

培训资源视频教程汇总

网校 视频教程 教程 培训 入门

更新:uni-app的视频教程见这里:https://uniapp.dcloud.io/resource

=========以下为5+app的培训资源=============

DCloud对开发者的学习支持分3个层面:官方文档、三方专业培训、网友经验分享

DCloud的精力主要在做产品,配套的文档也会一直完善好。
但专业的培训还不是DCloud能做好的,在HTML5中国产业联盟(http://www.html5plus.org)里,有不少专业的培训机构。
同时网友的学习经验分享也很重要。
本文汇总这些资源,希望更多的培训机构加入进来,也希望更多网友分享自己的经验。

官方入门文档

HTML5教程

  • DCloud的文档用于掌握HTML5的开发者学习HTML5+、mui等DCloud技术,如果对基础的HTML5还不甚了解,推荐先到这里学习:w3cschool HTML5教程 http://www.w3cschool.cn/html5/
继续阅读 »

更新:uni-app的视频教程见这里:https://uniapp.dcloud.io/resource

=========以下为5+app的培训资源=============

DCloud对开发者的学习支持分3个层面:官方文档、三方专业培训、网友经验分享

DCloud的精力主要在做产品,配套的文档也会一直完善好。
但专业的培训还不是DCloud能做好的,在HTML5中国产业联盟(http://www.html5plus.org)里,有不少专业的培训机构。
同时网友的学习经验分享也很重要。
本文汇总这些资源,希望更多的培训机构加入进来,也希望更多网友分享自己的经验。

官方入门文档

HTML5教程

  • DCloud的文档用于掌握HTML5的开发者学习HTML5+、mui等DCloud技术,如果对基础的HTML5还不甚了解,推荐先到这里学习:w3cschool HTML5教程 http://www.w3cschool.cn/html5/
收起阅读 »

【svn官方地址已迁移】HB安装最新的SVN版本管理插件支持1.10.x,希望对刚入门的有点帮助

SVN Mac

【svn官方地址已迁移,详情请查看https://github.com/subclipse/subclipse/wiki】
【new】https://dl.bintray.com/subclipse/archive/release/1.12.x/
不行的小伙伴就翻墙吧。推荐一个效果不错的免费的翻墙工具。
psiphon3,下载详见文末

刚用HB不久发现自带的SVN是1.6版本是在太古老了,就老想着升级,刚好今天又空摆弄了下。
Eclipse 的Subclipse 最新版本是1.10x
官方描述为:Subclipse 1.10.x includes and requires Subversion 1.10.x client features and working copy format.

Eclipse update site URL: 【old】http://subclipse.tigris.org/update_1.10.x

下面升级步骤如下:

  1. 打开工具-》插件安装

  1. 在弹出的插件安装界面选择“手动安装Eclipse插件”

  1. 在弹出的插件下载地址中把http://subclipse.tigris.org/update_1.10.x (也可以使用我们的镜像地址http://update.dcloud.net.cn/test/plugin_for_test)填进去,点击右边的添加,把下面的两个勾上,然后一直下一步到完成

  1. 安装完成之后关掉HB,重新打开升级一下工作副本就OK

继续阅读 »

【svn官方地址已迁移,详情请查看https://github.com/subclipse/subclipse/wiki】
【new】https://dl.bintray.com/subclipse/archive/release/1.12.x/
不行的小伙伴就翻墙吧。推荐一个效果不错的免费的翻墙工具。
psiphon3,下载详见文末

刚用HB不久发现自带的SVN是1.6版本是在太古老了,就老想着升级,刚好今天又空摆弄了下。
Eclipse 的Subclipse 最新版本是1.10x
官方描述为:Subclipse 1.10.x includes and requires Subversion 1.10.x client features and working copy format.

Eclipse update site URL: 【old】http://subclipse.tigris.org/update_1.10.x

下面升级步骤如下:

  1. 打开工具-》插件安装

  1. 在弹出的插件安装界面选择“手动安装Eclipse插件”

  1. 在弹出的插件下载地址中把http://subclipse.tigris.org/update_1.10.x (也可以使用我们的镜像地址http://update.dcloud.net.cn/test/plugin_for_test)填进去,点击右边的添加,把下面的两个勾上,然后一直下一步到完成

  1. 安装完成之后关掉HB,重新打开升级一下工作副本就OK

收起阅读 »

与蓝牙打印机建立连接并打印

蓝牙

mui.plusReady(function(){     
    var main = plus.android.runtimeMainActivity();  
    var BluetoothAdapter = plus.android.importClass("android.bluetooth.BluetoothAdapter");  
    var UUID=plus.android.importClass("java.util.UUID");  
    uuid=UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");  
    var BAdapter = BluetoothAdapter.getDefaultAdapter();  
    BAdapter.cancelDiscovery();//停止扫描  
    var addres_mac = plus.storage.getItem("printer");//传入打印机mac地址  
    device=BAdapter.getRemoteDevice(addres_mac);  
    plus.android.importClass(device);  
});  

function print(){  
    bluetoothSocket = device.createInsecureRfcommSocketToServiceRecord(uuid);  
    plus.android.importClass(bluetoothSocket);   
    if(!bluetoothSocket.isConnected()){  
        bluetoothSocket.connect();  
    }  
    var outputStream=bluetoothSocket.getOutputStream();  
    plus.android.importClass(outputStream);  
    var string="你好123";  
    var bytes = plus.android.invoke(string,'getBytes','gbk');  
    //console.log(bytes+"."+bytes.length);   
    outputStream.write(bytes);  
    outputStream.flush();  
}  
继续阅读 »

mui.plusReady(function(){     
    var main = plus.android.runtimeMainActivity();  
    var BluetoothAdapter = plus.android.importClass("android.bluetooth.BluetoothAdapter");  
    var UUID=plus.android.importClass("java.util.UUID");  
    uuid=UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");  
    var BAdapter = BluetoothAdapter.getDefaultAdapter();  
    BAdapter.cancelDiscovery();//停止扫描  
    var addres_mac = plus.storage.getItem("printer");//传入打印机mac地址  
    device=BAdapter.getRemoteDevice(addres_mac);  
    plus.android.importClass(device);  
});  

function print(){  
    bluetoothSocket = device.createInsecureRfcommSocketToServiceRecord(uuid);  
    plus.android.importClass(bluetoothSocket);   
    if(!bluetoothSocket.isConnected()){  
        bluetoothSocket.connect();  
    }  
    var outputStream=bluetoothSocket.getOutputStream();  
    plus.android.importClass(outputStream);  
    var string="你好123";  
    var bytes = plus.android.invoke(string,'getBytes','gbk');  
    //console.log(bytes+"."+bytes.length);   
    outputStream.write(bytes);  
    outputStream.flush();  
}  
收起阅读 »

获取已配对的蓝牙列表

蓝牙

function bluetooth_list(){  
    var main = plus.android.runtimeMainActivity();  
    var Context = plus.android.importClass("android.content.Context");  
    var lists = BAdapter.getBondedDevices();  
    plus.android.importClass(lists);  
    var resultDiv = document.getElementById('bluetooth_list');  
    var iterator = lists.iterator();  
    plus.android.importClass(iterator);  
    while (iterator.hasNext()) {  
            var d = iterator.next();  
            plus.android.importClass(d);  
        console.log(d.getAddress());  
    }  
}  
继续阅读 »

function bluetooth_list(){  
    var main = plus.android.runtimeMainActivity();  
    var Context = plus.android.importClass("android.content.Context");  
    var lists = BAdapter.getBondedDevices();  
    plus.android.importClass(lists);  
    var resultDiv = document.getElementById('bluetooth_list');  
    var iterator = lists.iterator();  
    plus.android.importClass(iterator);  
    while (iterator.hasNext()) {  
            var d = iterator.next();  
            plus.android.importClass(d);  
        console.log(d.getAddress());  
    }  
}  
收起阅读 »

该怎么判断是否已安装微信和QQ?

iOS 安装检测 qq 微信 Native.JS

苹果审核不过啊。很郁闷。
该怎么判断是否已安装微信和QQ?
找了好久也没找到方法

苹果审核不过啊。很郁闷。
该怎么判断是否已安装微信和QQ?
找了好久也没找到方法

小团队承接hbuilder和mui的外包

外包

如题:有需要外包的请联系我,前端加后台都可以全包,QQ1046373779

如题:有需要外包的请联系我,前端加后台都可以全包,QQ1046373779

分享: 如何离线调试基于Mui的移动APP (不接手机的Web调试)

调试

有时候真机或模拟器调试实在是不方便,速度也慢, 特别想再web中调试。
其实plus和mui的大部分功能都是可以在Web中实现的,只有一小部分native 特性无法支持
不过通过workaroud 一些方法,完全可以在Web完成80%的调试任务。

比如如下的简单workaroud, 不过还是有些mui控件会有异常,希望大家能集思广益,逐渐完善这些workaroud方法,让大家收益。

(function(root){  
    if(root.navigator.userAgent.indexOf("Html5Plus")<0){  
        console.log("Html5Plus is not exist");  
        root.TAP = "click";  

        if(root.mui){  
            root.mui.plusReady = function(cb){  
                cb();  
            }  
        }  
    }  
    else{  
        root.TAP = "tap";  
    }  

}(window))

为了解决tap的问题,需要在AddEventListener里面用TAP代替

mui("#id")[0].addEventListener(TAP, function(){ ))

试过toast功能,不需要workaroud就能用

继续阅读 »

有时候真机或模拟器调试实在是不方便,速度也慢, 特别想再web中调试。
其实plus和mui的大部分功能都是可以在Web中实现的,只有一小部分native 特性无法支持
不过通过workaroud 一些方法,完全可以在Web完成80%的调试任务。

比如如下的简单workaroud, 不过还是有些mui控件会有异常,希望大家能集思广益,逐渐完善这些workaroud方法,让大家收益。

(function(root){  
    if(root.navigator.userAgent.indexOf("Html5Plus")<0){  
        console.log("Html5Plus is not exist");  
        root.TAP = "click";  

        if(root.mui){  
            root.mui.plusReady = function(cb){  
                cb();  
            }  
        }  
    }  
    else{  
        root.TAP = "tap";  
    }  

}(window))

为了解决tap的问题,需要在AddEventListener里面用TAP代替

mui("#id")[0].addEventListener(TAP, function(){ ))

试过toast功能,不需要workaroud就能用

收起阅读 »

代码缩进会不会变的更舒服一点

现在的缩进:

希望优化的缩进:

现在的缩进:

希望优化的缩进:

5+App全局变量、常量、共享数据、跨webview传参的综述

跨页共享数据 跨页通信 传参 全局变量

> 本文是5+App的全局变量介绍,uni-app的全局变量另见文章:https://ask.dcloud.net.cn/article/35021

很多编程语言都有全局变量,但js语言没有。
HTML5+虽然也可以扩展类似plus.globle,但权衡后我们发现,新增类似的方案,不会对便利性有很大的提升,但对App的性能有负面影响,所以我们还是没有提供全局变量,但在本文中详述其他共享数据的方法。

共享数据有几种方法。

  1. localStorage
    localStorage是HTML5标准,可跨webview使用。
    是持久化存储的,App关闭后也存在,除非js手动删除。
    如果考虑持久化,可以使用localStorage
  2. 共享js文件的全局常量
    我们可以给每个HTML页面都引入一个相同的js文件,比如common.js,在里面定义一个变量,var g = 0;
    这个每个页面的g都等于0。
    但这种方式处理的变量是不能跨webview同步的,比如a.html引入common.js后,重新给g赋值为1,那么同样引入common.js的b.html里的g并不会同步更改为1。
    所以说这种方式只适合于共享常量。
  3. url传参
    在web时代,页面间传参的主要方式是url后面加问号,挂参数。形如 b.html?g=0
    然后在b页面里通过js解析title来获取值。
    这种方式问题很多,App开发不推荐使用这种方式。
    问题1是在某些Android手机上,应用的HTML资源必须从apk里解压出来放到sd卡里才能运行,否则就会报404找不到页面。
    而解压资源又影响第一次启动的速度。(解压资源的设置在manifest里)
    问题2是b页面在载入以后,a仍然要给b传递数据,此时就没法用了。
  4. HTML5+的evalJS方法
    plus.webview对象有evalJS方法,可以在一个webview里操作让另一个webview执行一段js,这个方法不仅可用于传递参数,还可用于随意的互相调用通信。
    evalJS类似js标准的eval方法,把js代码变成字符串传递过去,变量也变成值跟随字符串一起传过去。
    具体参考:
    http://www.html5plus.org/doc/zh_cn/webview.html#plus.webview.WebviewObject.evalJS
  5. mui的自定义事件
    mui的自定义事件是对HTML5+的evalJS的一种简化封装。
    当开发者使用mui框架时,可以更简单的跨页传递和获取参数。
    具体参考:
    http://ask.dcloud.net.cn/article/63
    6.其他
    方法其实还有很多,
    比如session.storage,在单页时可用。
    比如通过io共享数据,比如json文件或txt文件;
    比如websql、indexedDB、plus.storage;
    比如在服务器临时存。。。
继续阅读 »

> 本文是5+App的全局变量介绍,uni-app的全局变量另见文章:https://ask.dcloud.net.cn/article/35021

很多编程语言都有全局变量,但js语言没有。
HTML5+虽然也可以扩展类似plus.globle,但权衡后我们发现,新增类似的方案,不会对便利性有很大的提升,但对App的性能有负面影响,所以我们还是没有提供全局变量,但在本文中详述其他共享数据的方法。

共享数据有几种方法。

  1. localStorage
    localStorage是HTML5标准,可跨webview使用。
    是持久化存储的,App关闭后也存在,除非js手动删除。
    如果考虑持久化,可以使用localStorage
  2. 共享js文件的全局常量
    我们可以给每个HTML页面都引入一个相同的js文件,比如common.js,在里面定义一个变量,var g = 0;
    这个每个页面的g都等于0。
    但这种方式处理的变量是不能跨webview同步的,比如a.html引入common.js后,重新给g赋值为1,那么同样引入common.js的b.html里的g并不会同步更改为1。
    所以说这种方式只适合于共享常量。
  3. url传参
    在web时代,页面间传参的主要方式是url后面加问号,挂参数。形如 b.html?g=0
    然后在b页面里通过js解析title来获取值。
    这种方式问题很多,App开发不推荐使用这种方式。
    问题1是在某些Android手机上,应用的HTML资源必须从apk里解压出来放到sd卡里才能运行,否则就会报404找不到页面。
    而解压资源又影响第一次启动的速度。(解压资源的设置在manifest里)
    问题2是b页面在载入以后,a仍然要给b传递数据,此时就没法用了。
  4. HTML5+的evalJS方法
    plus.webview对象有evalJS方法,可以在一个webview里操作让另一个webview执行一段js,这个方法不仅可用于传递参数,还可用于随意的互相调用通信。
    evalJS类似js标准的eval方法,把js代码变成字符串传递过去,变量也变成值跟随字符串一起传过去。
    具体参考:
    http://www.html5plus.org/doc/zh_cn/webview.html#plus.webview.WebviewObject.evalJS
  5. mui的自定义事件
    mui的自定义事件是对HTML5+的evalJS的一种简化封装。
    当开发者使用mui框架时,可以更简单的跨页传递和获取参数。
    具体参考:
    http://ask.dcloud.net.cn/article/63
    6.其他
    方法其实还有很多,
    比如session.storage,在单页时可用。
    比如通过io共享数据,比如json文件或txt文件;
    比如websql、indexedDB、plus.storage;
    比如在服务器临时存。。。
收起阅读 »

分享错误码

Share

微信

Android

错误码参考Android微信SDK文档
-4 认证被否决
-1 一般错误
0 正确返回
-3 发送失败
-5 不支持错误
-2 用户取消

iOS

错误码 错误描述
-1 普通错误类型
-2 用户点击取消并返回
-3 发送失败
-4 授权失败
-5 微信不支持
-95 分享href或文本为空、图片路径不对或加载失败或其他错误
-96 图片超过限制
-97 thumb超过限制
-98 微信未安装
-99 无效的appid

腾讯QQ

Android

1000 非法操作
1001 服务器繁忙,请稍候再试
1002 请先登录
1003 本应用处于内测期间,您暂且未获内测资格,无法添加
1004 您没有对此应用进行操作的资格
1005 参数错误
1006 应用的英文名字已经被注册,请换一个后重试
1009 尊敬的用户,该应用正在进行系统维护,请您明天再来添加
1010 您已经添加了这个应用
1011 您还没有安装该应用
1012 您还没有安装任何应用
1013 发送名额不足
1014 只能对好友进行操作
1015 已送过礼物
1016 您已领取过该礼物,进入应用玩下吧!
1020 非法应用,请先申请授权
1021 没有未添加该应用的好友
1022 该应用没有使用该接口的权限
1023 邀请名额不足
1024 该应用不存在
1025 请重新登录
1026 初始化失败
1027 Sendstory 分享配置参数错误
1028 Sendstory 分享参数错误
1031 达到发送次数限制

iOS

错误码 错误描述
1 未安装QQ
6 app未注册
-1 发送失败

新浪微博

iOS

请参考:http://open.weibo.com/wiki/Error_code

Android

错误代码 错误信息 详细描述
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 follow 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 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过期
21335 Request uid's value must be the current user uid参数仅允许传入当前授权用户uid


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 地理信息输入错误

腾讯微博

Android

Todo...

iOS

错误码 错误描述
201 请求错误
202 返回accesstoken错误
203 无授权,或者受权已经过期,需要重新授权
204 无refreshtoken
205 授权出错
206 SSO授权出错
继续阅读 »

微信

Android

错误码参考Android微信SDK文档
-4 认证被否决
-1 一般错误
0 正确返回
-3 发送失败
-5 不支持错误
-2 用户取消

iOS

错误码 错误描述
-1 普通错误类型
-2 用户点击取消并返回
-3 发送失败
-4 授权失败
-5 微信不支持
-95 分享href或文本为空、图片路径不对或加载失败或其他错误
-96 图片超过限制
-97 thumb超过限制
-98 微信未安装
-99 无效的appid

腾讯QQ

Android

1000 非法操作
1001 服务器繁忙,请稍候再试
1002 请先登录
1003 本应用处于内测期间,您暂且未获内测资格,无法添加
1004 您没有对此应用进行操作的资格
1005 参数错误
1006 应用的英文名字已经被注册,请换一个后重试
1009 尊敬的用户,该应用正在进行系统维护,请您明天再来添加
1010 您已经添加了这个应用
1011 您还没有安装该应用
1012 您还没有安装任何应用
1013 发送名额不足
1014 只能对好友进行操作
1015 已送过礼物
1016 您已领取过该礼物,进入应用玩下吧!
1020 非法应用,请先申请授权
1021 没有未添加该应用的好友
1022 该应用没有使用该接口的权限
1023 邀请名额不足
1024 该应用不存在
1025 请重新登录
1026 初始化失败
1027 Sendstory 分享配置参数错误
1028 Sendstory 分享参数错误
1031 达到发送次数限制

iOS

错误码 错误描述
1 未安装QQ
6 app未注册
-1 发送失败

新浪微博

iOS

请参考:http://open.weibo.com/wiki/Error_code

Android

错误代码 错误信息 详细描述
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 follow 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 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过期
21335 Request uid's value must be the current user uid参数仅允许传入当前授权用户uid


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 地理信息输入错误

腾讯微博

Android

Todo...

iOS

错误码 错误描述
201 请求错误
202 返回accesstoken错误
203 无授权,或者受权已经过期,需要重新授权
204 无refreshtoken
205 授权出错
206 SSO授权出错
收起阅读 »