search

Home  >  Q&A  >  body text

javascript - After following the WeChat official account, you will receive a picture with a WeChat avatar and a QR code. How was this image generated?

After following the WeChat official account, you will receive a picture with a WeChat avatar and a QR code. How was this image generated?

PHP中文网PHP中文网2732 days ago903

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-05-27 17:44:17

    The QR code should be a reference QR code. You can follow the statistics based on this QR code

    Yes, these three pictures are combined into one (the imagecopymerge method I used)
    Let’s talk about the acquisition of these three pictures respectively
    1. Obtain the reference address with the QR code and the QR code document with the parameter
    2. Obtain the user avatar The user information contains
    3. The background image is prepared by yourself
    Then use image processing method to combine these three images into one image at the corresponding position

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-27 17:44:17

    The questioner is talking about after following the official account, jump to the conversation window, will the official account send you pictures in the conversation window? If so:
    Developers can have a server configuration in the development settings of the public management platform, Configure a server URL in it, which is actually the API accepted by the official account's events and messages. Developers can perform various logical processing in the API themselves.
    When users follow the official account, the API will receive WeChat push messages Pay attention to the event Event=subscribe. The message body contains the user's openid. With this openid, you can do a lot of things, such as pulling the user's information (avatar, nickname, etc.), and then you can use it according to your own business logic. Process the desired results and return them in the push of the event of interest, and the user will receive various information.

    reply
    0
  • PHPz

    PHPz2017-05-27 17:44:17

    If the QR code is connected to the avatar, generate the QR code and then fill it into the picture template. Then follow it and call WeChat SDK to push it out.

    reply
    0
  • Cancelreply