Home WeChat Applet WeChat Development WeChat public platform develops UnionID

WeChat public platform develops UnionID

Mar 03, 2017 am 10:14 AM
Micro-channel public platform

WeChat public platform is updated to provide developers with the UnionID mechanism

According to feedback from developers, due to the need for user accounts to be interoperable between multiple public accounts under the same company, the WeChat open platform provides a UnionID mechanism to solve the problem. This problem.

Through the interface for obtaining basic user information, developers can obtain basic user information through OpenID. If the developer has multiple official accounts, the following method can be used to use the UnionID mechanism to transfer users between multiple official accounts. Account interoperability.

1. Bind multiple public accounts to the same WeChat open platform (open.weixin.qq.com) account, that is, under the same Union

2. Obtain the user’s basic information The UnionID in the information interface is used to distinguish the uniqueness of users. However, it should be noted that the official account will only obtain the UnionID after it is bound to the WeChat open platform account. As long as it is a public account under the same WeChat open platform account, the user's UnionID is unique. In other words, the same user has the same UnionID for different applications under the same WeChat open platform account.

1. Register for the WeChat Open Platform

Address: http://open.weixin.qq.com/

The process is omitted.

2. Bind WeChat public account

Click on the "Management Center" at the top, select "Official Account", and then click "Bind Public Account"

WeChat public platform develops UnionID

Only public accounts certified by WeChat can be bound.

3. Obtain basic user information

This is achieved by using the advanced interface to obtain basic user information. For methods, please refer to WeChat Public Platform Development to Obtain Basic User Information

The user information of Fang times obtained under the first official account is as follows:

{
    "subscribe": 1,
    "openid": "oLVPpjqs9BhvzwPj5A-vTYAX3GLc",
    "nickname": "方倍",
    "sex": 1,
    "language": "zh_CN",
    "city": "广东",
    "province": "深圳",
    "country": "中国",
    "headimgurl": "http://wx.qlogo.cn/mmopen/utpKYf69VAbCRDRlbUsPsdQN38DoibCkrU6SAMCSNx558eTaLVM8PyM6jlEGzOrH67hyZibIZPXu4BK1XNWzSXB3Cs4qpBBg18/0",
    "subscribe_time": 1375706487,
    "unionid": "oTBn-jt2RQSHdBoJQYFSdnZo8BBQ"
}
Copy after login

The user information of Fang times obtained under the first official account is as follows:

{
    "subscribe": 1,
    "openid": "ouBMEj6WFnUFBIUKe83VD7s7dft9",
    "nickname": "方倍",
    "sex": 1,
    "language": "zh_CN",
    "city": "广东",
    "province": "深圳",
    "country": "中国",
    "headimgurl": "http://wx.qlogo.cn/mmopen/utpKYf69VAbCRDRlbUsPsdQN38DoibCkrU6SAMCSNx558eTaLVM8PyM6jlEGzOrH67hyZibIZPXu4BK1XNWzSXB3Cs4qpBBg18/0",
    "subscribe_time": 1375726425,
    "unionid": "oTBn-jt2RQSHdBoJQYFSdnZo8BBQ"
}
Copy after login

Note that the openid of two different user information

is different under different public accounts, but their unionid is the same. Other information is not unique and has no comparative significance. But the basic message is the same.

In this way, we know that the people following the two public accounts are actually the same person.

4. The meaning of UnionID

For companies with multiple accounts, unionid can help identify whether users under different public accounts are the same person. In this way, the services provided to the user under different accounts can be continuous.

You can also remove the number of duplicate following users to facilitate statistics of the true total number of following users.

For more articles related to WeChat public platform development UnionID, please pay attention to the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)