Home  >  Q&A  >  body text

php - How to communicate data during WeChat login


The previous WeChat public account login project was like this
Login uses userid origin_id openid to identify the uniqueness of the user and then add new users

However, due to project requirements, a small program is needed to realize data interoperability on both sides.
So I added a unionid and the appid of the small program and the openid of the small program
But there will still be a problem where a user has 2 days of data
May I ask the master how to deal with it
Consider how it is compatible when there is no unionid mode before. If you log in to the mini program first and then go to WeChat, there will be one user and two accounts

欧阳克欧阳克2711 days ago911

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-06-10 09:49:22

    http://www.cnblogs.com/txw195...

    The public account is bound to the open platform, and the unionid can also be obtained after authorization from the public platform web page. unionid is universal, that is to say unionid is bound as the only one.

    userid+origin_id+unionid, write a special method to run the old data, use openid to pull the user's information, and update the unionid, so that it can be compatible.

    reply
    0
  • Cancelreply