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
- $ch = Curl_init ();
- curl_setopt ($ch, Curlopt_url, $url);
- curl_setopt ($ch, Curlopt_ssl_verifypeer, false);
- curl_setopt ($ch, Curlopt_ssl_verifyhost, false);
- curl_setopt ($ch, Curlopt_returntransfer, 1);
- $result = curl_exec ($ch);
- return $result