Use WeChat login micro-mall directly to access WeChat user information? How do you do that?

Source: Internet
Author: User
Tags php example

Similar to this, a login prompts whether to obtain user information This, is not used by the third party landing? or interface or something, I hope to provide some information

The question was solved in the afternoon of the question, but forgot to turn off the problem. I am a reference to a blog post, inside the code and content written in very detailed, Link: Public Platform OAuth2.0 Web page Authorization PHP example

Here are some of the following:

Reply content:

Similar to this, a login prompts whether to obtain user information This, is not used by the third party landing? or interface or something, I hope to provide some information

The question was solved in the afternoon of the question, but forgot to turn off the problem. I am a reference to a blog post, inside the code and content written in very detailed, Link: Public Platform OAuth2.0 Web page Authorization PHP example

Here are some of the following:

Http://mp.weixin.qq.com/wiki/4/9ac2e7b1f1d22e9e57260f6553822520.html
The item is used. is generally
1. First you have to have a public number (the public number has authorized authority),
2. Then go to the public number management platform to configure the authorization callback domain name,
3. Then access the https://open.weixin.qq.com/connect/oauth2/authorize?appid=appid&redirect_uri=redirect_uri& in the project correspondence class Response_type=code&scope=scope&state=state&connect_redirect=1#wechat_redirect will pop up the authorization box.

注:APPID  公众号应用ID   REDIRECT_URI 授权成功回调地址   SCOPE SCOPE参数有snsapi_base (不弹出授权页面,直接跳转,只能获取用户openid),snsapi_userinfo (弹出授权页面,可通过openid拿到昵称、性别、所在地。并且,即使在未关注的情况下,只要用户授权,也能获取其信息)

Third-party landing Ah, generally with the Oauth2 interface, you agree later, will return a token to the mall, this token allows to obtain your data for your previous authorized data.
If you're looking for information, just search for oauth2 .

Https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842&token=&lang=zh_CN
Public Platform Login API documentation

When you pay attention to the public number, you will be prompted to obtain your information, when you enter the public number, the server has received the server sent you the relevant information.
If you do not pay attention to the public number, enter the mall will also prompt to get your information, click, the other side can get your personal information

Take a look at the development documentation for the public platform.

  • Related Article

    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.