How to support QQ logon for your website

Source: Internet
Author: User
1. open open.qq.com to add and create an application:-enter the regular data and you will see the corresponding APPID and KEY value. this is the only verification for your ID card.

1. open open.qq.com to add and create an application:-enter regular data and you will see the corresponding app id and KEY value. this is the only verification for your ID card.

2. open the http://connect.qq.com/manage/ click-> Add Site-> enter the relevant information here more special attention is, the callback address where you fill in your domain name can be the above core needs one to two days, wait patiently...

3. open the ghost SDK package. if your virtual space file_get_contents does not support https, you can use the curl function instead. This is why many children's shoes often fail to get the access_token. If any package is not in one breath, you need to configure the relevant configurations. I will discuss the debugging process of this complicated cable here. Let's talk about the principle-> log on to QQ state and scope through your website-> get access_token-> then obtain the unique ID openid of each QQ

4. After debugging is successful, you need to bind the ID to your current website account to automatically identify the bound account content at next login.

FAQs:

1. warning: session_start () [function. session-start]: open (/tmp \ sess_s9b1ahi6vnvc0pfl2e0dcd0l10, O_RDWR) failed: solution: No such file or directory (2) inD: \ powhost \ bbcarblog \ web \ test \ qqSDK \ comm \ session. php on line 196

Locate sssion. php session_save_path, add the annotation //, and comment out the setting path.

2. Notice: file_get_contents () [function. file-get-contents]: Unable to find the wrapper "https"-did you forget to enable it when you configured PHP? InD: \ powhost \ bbcarblog \ web \ test \ qqSDK \ comm \ utils. php on line 37
Solution: Find Utils. php function get_url_contents function content is directly replaced by the following code, because file_get_content does not support access to https by default. to support this function, configure php. ini, activate the php_openssl.dll module. you can use Baidu to configure it.
 

Copy content from PHP Code to clipboard
  1. $ Ch = curl_init ();
  2. Curl_setopt ($ ch, CURLOPT_URL, $ url );
  3. Curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, false );
  4. Curl_setopt ($ ch, CURLOPT_SSL_VERIFYHOST, false );
  5. Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
  6. $ Result = curl_exec ($ ch );
  7. Return $ result

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.