Can I obtain the QQ number through openId?

Source: Internet
Author: User
Can I obtain the QQ number through openId? I have successfully obtained the QQ openId in PHP. can I obtain the QQ number through openId? If yes, how can I obtain it?


Reply to discussion (solution)

No, I didn't find this interface.

Like the platform, you can only get nickname pictures and other general user information, such as high-density information such as QQ numbers, which you cannot find, but there are alternative methods.

Take the public platform as an account to follow a public account. its openID is unique for this public account. if you want to distinguish users from this openId

After obtaining QQ information through js, I submitted it to the background for registration using the following code
// You can call your own save interface here
$. Post ("/api_QQ.php ",{
Login_account: openId,
Nickname: reqData. nickname,
Act: 'login ',
Rand: Math. random ()
}, Function (data ){
If (data. status. code = '1 ')
{
Window. location. reload ();
}
}, "Json ");

The api_QQ.php code is as follows: I am careful that someone else directly simulates POST data and directly enters the api_QQ.php registration. how can I prevent it?
If ($ action = 'login ')
{
If (isset ($ _ SERVER ["HTTP_X_REQUESTED_WITH"]) & strtolower ($ _ SERVER ["HTTP_X_REQUESTED_WITH"]) = "xmlhttprequest ")
{
$ Login_account = isset ($ _ POST ['login _ account'])? Trim ($ _ POST ['login _ account']): '';
$ Real_name = isset ($ _ POST ['nickname'])? Trim ($ _ POST ['nickname']): '';

$ Ajax = array ();
If ($ user-> check_user ($ login_account )! = False)
{
// Directly log on if you have registered
...... Omitted
}
Else
{
// Register and log on directly if not registered
...... Omitted
}
$ Ajax ['status'] ['code'] = '1'; // success
Echo json_encode ($ ajax );
Exit;
}
}

There should be no public API for the QQ number.

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.