获取已选择平台供应商

来自云登录
2012年5月9日 (三) 11:46Admin (讨论 | 贡献)的版本
跳转到: 导航, 搜索


接口名称

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

个人工具
社会化登录介绍