轻松实现QQ用户接入


1. 申请合作伙伴ID (PID),Key (PKey)
2. 发送请求
  https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=100000353&redirect_uri=http://www.wodongni.com/loginReturn.aspx
  redirect_uri:回传URL
  client_id: 合作伙伴ID (PID)
  返回:
   string code = Request.QueryString["code"];
3. https://graph.qq.com/oauth2.0/me?access_token=****access_token
  access_token: 第2部获取的code 值
   返回:
   callback( {"client_id": 合作伙伴ID(PID),"openid":"****openID"} );
4. https://graph.qq.com/user/get_user_info?access_token=****access_token&oauth_consumer_key=100236353&openid=****openID
 返回:
 { "ret":0, "msg":"", "nickname":"QQ姓名", "figureurl":"头像1", "figureurl_1":"头像2", "figureurl_2":"头像3", "gender":"男" }

posted @ 2011-12-23 14:43  Rhythmk  阅读(3560)  评论(0编辑  收藏  举报
Rhythmk 个人笔记