首页 > 轻松实现QQ用户接入

轻松实现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":"男" }

转载于:https://www.cnblogs.com/rhythmK/archive/2011/12/23/2299420.html

更多相关: