The web page opened in the built-in browser to get the user's openid. I have activated a developer account of 300 RMB.
The requirements are as follows:
Currently, a wap web page is opened in a built-in browser (via a circle of friends/friend sharing, or by scanning the QR code on the webpage, which is irrelevant to the public account). how does the Web page obtain the user's openid?
According to the official logon help, you can scan the code to log on to the PC version. In my situation, the current webpage is opened on the mobile phone. how can I scan the QR code?
I see some websites that can be implemented. an authorization prompt box will pop up, but I don't know how to implement it? Thank you !!
Reply to discussion (solution)
Http://mp.weixin.qq.com/wiki/17/c0f37d5704f0b64713d5d2c37b468d75.html
Look at this
The built-in browser obtains the user's openid, and the public platform OAuth2.0 web page Authorization
Bytes -----------------------------------------------------------------------------------------------
First, your website entry must be a service number (activate authentication and have the permission to obtain the user's openid; the subscription number cannot be used ).
The oau2authentication link on the webpage.
Then access the website through 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
Compile oauth2.php content based on the provided oau2interface document (related official SDKs are available online)
Follow these steps:
1. obtain the user's openid
2. get accesson_token
3. get user information
4. authorize a registered user. if the user already exists, go to the website.
The http://huangqiqing123.iteye.com/blog/2005770 can refer to this.
The authorization prompt box appears. this is the logon of the public account.
When you click authorize, the user will jump to your page, and the parameter will contain the token
Then you can call the interface through token to query openid and so on.
The built-in browser obtains the user's openid, and the public platform OAuth2.0 web page Authorization
Bytes -----------------------------------------------------------------------------------------------
First, your website entry must be a service number (activate authentication and have the permission to obtain the user's openid; the subscription number cannot be used ).
The oau2authentication link on the webpage.
Then access the website through 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
Compile oauth2.php content based on the provided oau2interface document (related official SDKs are available online)
Follow these steps:
1. obtain the user's openid
2. get accesson_token
3. get user information
4. authorize a registered user. if the user already exists, go to the website.
The http://huangqiqing123.iteye.com/blog/2005770 can refer to this.
If you have obtained the openid authentication in the built-in browser, you can enter the website (the built-in browser). If you click the upper right corner... open in the browser and jump out. Can I still get the user's openid to ensure the login status?
The built-in browser obtains the user's openid, and the public platform OAuth2.0 web page Authorization
Bytes -----------------------------------------------------------------------------------------------
First, your website entry must be a service number (activate authentication and have the permission to obtain the user's openid; the subscription number cannot be used ).
The oau2authentication link on the webpage.
Then access the website through 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
Compile oauth2.php content based on the provided oau2interface document (related official SDKs are available online)
Follow these steps:
1. obtain the user's openid
2. get accesson_token
3. get user information
4. authorize a registered user. if the user already exists, go to the website.
The http://huangqiqing123.iteye.com/blog/2005770 can refer to this.
On some pages, the following prompt is displayed when you open them in an external browser. if some pages do not exist, how can this problem be solved?