QQ互联的头像是怎么保存到ucenter下的,我现在要在uchome下做个插件,遇到的问题是远程的QQ头像怎么保存到ucenter下,在dx2中 我看了好久代码也没看明白
只看到相关的代码
- function connect_user_bind_params() {
- global $_G;
- connect_merge_member();
- getuserprofile('birthyear');
- getuserprofile('birthmonth');
- getuserprofile('birthday');
- switch ($_G['member']['gender']) {
- case 1 :
- $sex = 'male';
- break;
- case 2 :
- $sex = 'female';
- break;
- default :
- $sex = 'unknown';
- }
- $is_public_email = 2;
- $is_use_qq_avatar = $_G['member']['conisqzoneavatar'] == 1 ? 1 : 2;
- $birthday = sprintf('%04d', $_G['member']['birthyear']).'-'.sprintf('%02d', $_G['member']['birthmonth']).'-'.sprintf('%02d', $_G['member']['birthday']);
- $agent = md5(time().rand().uniqid());
- $inputArray = array (
- 'uid' => $_G['uid'],
- 'agent' => $agent,
- 'time' => TIMESTAMP
- );
- require_once DISCUZ_ROOT.'./config/config_ucenter.php';
- $input = 'uid='.$_G['uid'].'&agent='.$agent.'&time='.TIMESTAMP;
- $avatar_input = authcode($input, 'ENCODE', UC_KEY);
- $params = array (
- 'oauth_consumer_key' => $_G['setting']['connectappid'],
- 'u_id' => $_G['uid'],
- 'username' => $_G['member']['username'],
- 'email' => $_G['member']['email'],
- 'birthday' => $birthday,
- 'sex' => $sex,
- 'is_public_email' => $is_public_email,
- 'is_use_qq_avatar' => $is_use_qq_avatar,
- 's_id' => $_G['setting']['connectsiteid'],
- 'avatar_input' => $avatar_input,
- 'avatar_agent' => $agent,
- 'site_ucenter_id' => UC_APPID
- );
- return $params;
- }
复制代码
但不知道是怎么实现的,同通过flash发送到ucenter的吗 ?
具体上传代码不知道在哪里,那个保存远程QQ头像的代码又在哪里?
求教各位..
不知道这里是怎么发送的
$avatar_input = authcode($input, 'ENCODE', UC_KEY);
$params = array (
'oauth_consumer_key' => $_G['setting']['connectappid'],
'u_id' => $_G['uid'],
'username' => $_G['member']['username'],
'email' => $_G['member']['email'],
'birthday' => $birthday,
'sex' => $sex,
'is_public_email' => $is_public_email,
'is_use_qq_avatar' => $is_use_qq_avatar,
's_id' => $_G['setting']['connectsiteid'],
'avatar_input' => $avatar_input,
'avatar_agent' => $agent,
'site_ucenter_id' => UC_APPID
); |
|