获取已选择平台供应商
来自云登录
(版本间的差异)
第1行: | 第1行: | ||
__NOTOC__ | __NOTOC__ | ||
+ | |||
+ | ===接口名称=== | ||
+ | denglu.provider.get | ||
===接口描述=== | ===接口描述=== | ||
第57行: | 第60行: | ||
<pre> | <pre> | ||
{ | { | ||
− | ' | + | 'res' : 'succ', |
'data' : { | 'data' : { | ||
'0' : { | '0' : { |
2012年5月9日 (三) 11:46的版本
接口名称
denglu.provider.get
接口描述
获取用户绑定的所有媒体的关系。
接口URL
http://denglu.ex-sandbox.com/api
支持格式
JSON
HTTP请求方式
POST
请求参数
参数 | 是否必填 | 描述 |
---|---|---|
method | 是 | API接口名称 |
appid | 是 | 你的云登入App ID |
timestamp | 是 | 时间戳,允许客户端请求时间误差为10分钟 |
sign_method | 是 | 签名的加密方式,只支持MD5 |
v | 是 | API协议版本,可选值:1.0。 |
format | 否 | 可选,指定响应格式。默认json,目前支持格式为xml,json |
sign | 是 | API输入参数签名结果 |
注意事项
无
返回结果
{ 'res' : 'succ', 'data' : { '0' : { 'code' : 'sina', 'name' : '新浪微博', 'share' : '1', 'authorize' : 'http://denglu.ex-sandbox.com:80/transfer/sina/authorize?appid=1438333333', 'image' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_3.png', 'icon' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_icon_3.png', 'icon_gray' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_icon_no_3.png' }, '1' : { 'code' : 'tencent', 'name' : '腾讯微博', 'share' : '1', 'authorize' : 'http://denglu.ex-sandbox.com:80/transfer/tencent/authorize?appid=1438333333', 'image' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_4.png', 'icon' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_icon_4.png', 'icon_gray' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_icon_no_4.png' } } }
字段说明
字段(键) | 描述 |
---|---|
code | 云登入平台供应商编码 |
name | 云登入平台供应商名称 |
share | 是否有分享功能 |
image | 平台供应商大图片 |
icon | 平台供应商小图标 |
icon_gray | 平台供应商灰色小图标 |
示例代码
$commit_url = "http://denglu.ex-sandbox.com/api/"; $params['method'] = 'denglu.provider.get'; $params['appid'] = '1438333333'; $params['timestamp'] = time(); $params['sign_method'] = 'md5'; $params['v'] = '1.0'; $params['format'] = 'json'; $params['sign'] = _create_sign($params, '51c1af7c45a98d401beb7e024f0d412c'); $snoopy = new Snoopy(); $snoopy->submit($commit_url, $params); $result = $snoopy->results;
具体见云登入SDK