Browser access to user information is often seen, but how can the browser get the user information exactly how to achieve? This article will give you an explanation of the browser's access to user information.
I have opened a developer account for 300 yuan.
The requirements are as follows:
The existing WAP Web page, the user uses the built-in browser to open (through the friend Circle/friend sharing, or sweeps the Web page QR code and so on the way enters, has nothing to do with the public number), how this webpage obtains the user's OpenID?
According to the official login help, it is possible to implement the scan code login, but for the PC version of-scan code, computer-side login. And my situation is the current page is open on the phone, how to sweep code it?
I see some sites can be implemented, will pop up the authorization prompt box, but do not know how to achieve it? Thank you!!
Reply to discussion (solution)
Http://mp.weixin.qq.com/wiki/17/c0f37d5704f0b64713d5d2c37b468d75.html
Check this out
Built-in browser to get user's OpenID, public platform OAuth2.0 Web license
-----------------------------------------------------------------------------------------------
First of all, your website must be a service number (authentication, access to the user OpenID, subscription number is not).
Web page through the OAUTH2 certification link.
Then go to the website via the Service number menu link, such as: https://open.weixin.qq.com/connect/oauth2/authorize?appid=YOURAPPID&redirect_uri=http:// Youwebsite/oauth2.php&response_type=code&scope=snsapi_base&state=state#wechat_redirect
Write oauth2.php content according to the Oauth2 interface documentation provided, (the official SDK is available online)
Follow the steps below:
1. Get User OpenID
2. Get Accesson_token
3. Get user Information
4. Authorized registered user, if the user already exists, then go directly to the website.
Inside Open the Authorization prompt box appears, this is the public number of the landing
When the user clicks on the authorization, will jump to your page, the parameter inside will carry the token
Then you can call the interface via token, query OpenID, etc.
Some pages, open with an external browser will have the following tips, some do not, how to do it?