Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of the Development of UnionID on Wechat Public platform

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "sample analysis of the development of UnionID on Wechat public platform", which is easy to understand and well organized. I hope it can help you solve your doubts. Now let the editor lead you to study and study the article "sample analysis of UnionID development on Wechat public platform".

Update of Wechat public platform to provide UnionID mechanism for developers

According to feedback from developers, as user accounts need to be exchanged among multiple official accounts under the same company, the Wechat open platform provides a UnionID mechanism to solve this problem.

Through the API for obtaining basic user information, developers can obtain basic user information through OpenID, and if developers have multiple official accounts, they can use the following method to exchange user accounts between multiple official accounts through the UnionID mechanism.

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

two。 Distinguish the uniqueness of users by obtaining the UnionID in the API for basic user information. However, it is important to note that the official account will not obtain UnionID until it is bound to the Wechat open platform account. As long as it is an official 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.

First, register Wechat open platform

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

The process is slight.

Second, bind the official account of Wechat

Click "Administration Center" at the top, select "official account", and then click "bind official account"

Third, obtain basic information of users

This is achieved by using the access to basic information of users in the advanced interface. The method refers to the development of Wechat public platform to obtain basic information of users.

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

{"subscribe": 1, "openid": "oLVPpjqs9BhvzwPj5A-vTYAX3GLc", "nickname": "Fang times", "sex": 1, "language": "zh_CN", "city": "Guangdong", "province": "Shenzhen", "country": "China", "headimgurl": "http://wx.qlogo.cn/mmopen/utpKYf69VAbCRDRlbUsPsdQN38DoibCkrU6SAMCSNx558eTaLVM8PyM6jlEGzOrH67hyZibIZPXu4BK1XNWzSXB3Cs4qpBBg18/0"," subscribe_time ": 1375706487 "unionid": "oTBn-jt2RQSHdBoJQYFSdnZo8BBQ"}

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

{"subscribe": 1, "openid": "ouBMEj6WFnUFBIUKe83VD7s7dft9", "nickname": "Fang times", "sex": 1, "language": "zh_CN", "city": "Guangdong", "province": "Shenzhen", "country": "China", "headimgurl": "http://wx.qlogo.cn/mmopen/utpKYf69VAbCRDRlbUsPsdQN38DoibCkrU6SAMCSNx558eTaLVM8PyM6jlEGzOrH67hyZibIZPXu4BK1XNWzSXB3Cs4qpBBg18/0"," subscribe_time ": 1375726425 "unionid": "oTBn-jt2RQSHdBoJQYFSdnZo8BBQ"}

Note two different user information

The openid 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 information is consistent.

In this way, we know that the person who follows the two public accounts is actually the same person.

IV. The significance of UnionID

For companies with multiple accounts, unionid can help identify whether users under different public accounts are the same person.

It can also remove the number of users who follow repeatedly, and it is convenient to count the total number of users who follow them.

The above is all the contents of the article "sample Analysis of the Development of UnionID on Wechat Public platform". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report