How to support your website QQ login

Source: Internet
Author: User
Tags domain name

1. Open open.qq.com Add Create application:-"Enter the regular data you will see the corresponding app ID and key value, which is the only verification of your identity card

2. Open http://connect.qq.com/manage/Click-> Add site-> Enter relevant information here more special attention is, the callback address where you fill in your domain name can be more than a day or a half time, waiting patiently ...

3. Open http://wiki.opensns.qq.com/wiki/%E3%80%90QQ%E7%99%BB%E5%BD%95%E3%80%91%E7%BD%91%E7%AB%99%E6%8E%A5%E5%85% A5 Find the SDK library download, I am here to download is the official PHP SDK package, if your virtual space file_get_contents do not hold HTTPS, you can consider using the Curl function to replace, many children's shoes often because not to get Access_token is this reason. Any one package is not coherent, but also need you to configure the relevant configuration, the process of debugging this reproduction I will be here to discuss. Say the principle-> through your website Login QQ state and scope-> get access_token-> each QQ unique identity ID OpenID

4. Here you debug successfully, after obtaining the ID, but also with your current website account number binding, in order to be able to automatically identify your relevant binding account when landing next time

Problems:

1.warning:session_start () [Function.session-start]: Open (/tmp\sess_s9b1ahi6vnvc0pfl2e0dcd0l10, O_RDWR) failed: Workaround: No such file or directory (2) ind:\powhost\bbcarblog\web\test\qqsdk\comm\session.php on line 196

Find sssion.php Session_save_path plus comments//, comment out settings path

2.notice:file_get_contents () [function.file-get-contents]: Unable to find the wrapper "https"-did your forget to enable It when you configured PHP? Ind:\powhost\bbcarblog\web\test\qqsdk\comm\utils.php on line 37
Workaround: Find the utils.php function get_url_contents content directly in the following code, because File_get_content does not support access to HTTPS by default, if you want to support the need to configure php.ini, activate Php_ Openssl.dll module, this everyone Baidu configuration will be

    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.