获取所有平台供应商

来自云登录
(版本间的差异)
跳转到: 导航, 搜索
 
(未显示1个用户的6个中间版本)
第5行: 第5行:
  
 
===接口描述===
 
===接口描述===
获取云登录平台支持的所有平台供应商
+
获取云登录平台支持的所有平台供应商,及用户平台选择情况
  
 
===接口URL===
 
===接口URL===
http://denglu.ex-sandbox.com/api
+
http://www.ecopen.cn/api
  
 
===支持格式===
 
===支持格式===
第63行: 第63行:
 
'data' : {
 
'data' : {
 
'0' : {
 
'0' : {
 +
                        'selected' : '1',
 
'code' : 'sina',
 
'code' : 'sina',
 
'name' : '新浪微博',
 
'name' : '新浪微博',
 
'share' : '1',
 
'share' : '1',
'authorize' : 'http://denglu.ex-sandbox.com:80/transfer/sina/authorize?appid=1438333333',
+
'authorize' : 'http://www.ecopen.cn:80/transfer/sina/authorize?appid=1438333333',
'image' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_3.png',
+
'image' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_3.png',
'icon' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_icon_3.png',
+
'icon' : 'http://www.ecopen.cn: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'
+
'icon_gray' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_icon_no_3.png'
 
},
 
},
 
'1' : {
 
'1' : {
 +
                        'selected' : '0',
 
'code' : 'tencent',
 
'code' : 'tencent',
 
'name' : '腾讯微博',
 
'name' : '腾讯微博',
 
'share' : '1',
 
'share' : '1',
'authorize' : 'http://denglu.ex-sandbox.com:80/transfer/tencent/authorize?appid=1438333333',
+
'authorize' : 'http://www.ecopen.cn:80/transfer/tencent/authorize?appid=1438333333',
'image' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_4.png',
+
'image' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_4.png',
'icon' : 'http://denglu.ex-sandbox.com:80/statics/default/images/denglu_second_icon_4.png',
+
'icon' : 'http://www.ecopen.cn: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'
+
'icon_gray' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_icon_no_4.png'
 
}
 
}
 
}
 
}
第90行: 第92行:
 
!字段(键)
 
!字段(键)
 
!描述
 
!描述
 +
|-
 +
|selected
 +
|用户是否已选择,1已选择,0未选择
 
|-
 
|-
 
|code
 
|code
第96行: 第101行:
 
|name
 
|name
 
|云登入平台供应商名称
 
|云登入平台供应商名称
 +
|-
 +
|share
 +
|是否有分享功能
 
|-
 
|-
 
|image
 
|image
第110行: 第118行:
 
===示例代码===
 
===示例代码===
 
<pre>
 
<pre>
$commit_url = "http://denglu.ex-sandbox.com/api/";
+
$commit_url = "http://www.ecopen.cn/api/";
 
$params['method'] = 'denglu.provider.list';
 
$params['method'] = 'denglu.provider.list';
 
$params['appid'] = '1232333333';
 
$params['appid'] = '1232333333';

2012年6月11日 (一) 10:30的最后版本


接口名称

denglu.provider.list

接口描述

获取云登录平台支持的所有平台供应商,及用户平台选择情况

接口URL

http://www.ecopen.cn/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' : {
                        'selected' : '1',
			'code' : 'sina',
			'name' : '新浪微博',
			'share' : '1',
			'authorize' : 'http://www.ecopen.cn:80/transfer/sina/authorize?appid=1438333333',
			'image' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_3.png',
			'icon' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_icon_3.png',
			'icon_gray' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_icon_no_3.png'
		},
		'1' : {
                        'selected' : '0',
			'code' : 'tencent',
			'name' : '腾讯微博',
			'share' : '1',
			'authorize' : 'http://www.ecopen.cn:80/transfer/tencent/authorize?appid=1438333333',
			'image' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_4.png',
			'icon' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_icon_4.png',
			'icon_gray' : 'http://www.ecopen.cn:80/statics/default/images/denglu_second_icon_no_4.png'
		}
	}
}

字段说明

字段(键) 描述
selected 用户是否已选择,1已选择,0未选择
code 云登入平台供应商编码
name 云登入平台供应商名称
share 是否有分享功能
image 平台供应商大图片
icon 平台供应商小图标
icon_gray 平台供应商灰色小图标

示例代码

$commit_url = "http://www.ecopen.cn/api/";
$params['method'] = 'denglu.provider.list';
$params['appid'] = '1232333333';
$params['timestamp'] = time();
$params['sign_method'] = 'md5';
$params['v'] = '1.0';
$params['format'] = 'json';
$params['sign'] = _create_sign($params, '352b34e777ef76ab025b87cb0add0c8e');
$snoopy = new Snoopy();
$snoopy->submit($commit_url, $params);
$result = $snoopy->results;

具体见云登入SDK

个人工具
社会化登录介绍