PHP implementation QQ third-party login

Source: Internet
Author: User

In addition to QQ third-party login. and Weibo, and other third-party logins

QQ Third party login, follow oauth2.0 agreement here is the description http://www.cnblogs.com/yx520zhao/p/6616686.html

QQ third-party login needs to apply for AppID and appkey instructions see here Http://www.cnblogs.com/yx520zhao/p/6616672.html

Here you will find common AppID and Appkey

Callback Address:http://www.iwebshop.com/index.php

appid:101353491

Appkey:d F4e46ba7da52f787c6e3336d30526e4

Can be used for local testing

1. Download the SDK. Baidu QQ connected to find the home navigation document information is this address http://wiki.connect.qq.com/
2. download location See figure

3. Download it down. Unzip to the root of the Web site. The directory is named QQ.

That is to say. Now access the HTTP://WWW.IWEBSHOP.COM/QQ is able to open as shown in the look

Click to view example browser do not close.
4. Create a new index.php and then copy all the code in the/qq/example/oauth/callback.php. Then copy the 8th line of code in the/qq/example/get_info/get_info.php.
Adjust the introduction path. Get the following code

<?php
Require_once ("./qq/api/qqconnectapi.php");
QC=newqc(); QC=NEWQC (); Qc->qq_callback ();
QC?>Ge Top en id (; va r Dum p ( Qc?>getopenid (); Vardump (Qc->get_info ());

5. Go back to the browser. Click QQ Login and Log in.

The user information was successfully obtained.

Good text to the topfollow me to collect this article

PHP implementation QQ third-party login

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.