轻松实现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":"男" }
一只站在树上的鸟儿,从来不会害怕树枝会断裂,因为它相信的不是树枝,而是它自己的翅膀。与其每天担心未来,不如努力做好现在。