Forwarding

Obtaining More Forwarded Information

Generally, developers wants users to get some information, such as group identifier, when they open a forwarded Mini Program. Now, by calling wx.showShareMenu and setting withShareTicket as true, when a user forwards a Mini Program to a group chat and this forwarded card is opened by other users in this group chat, they can get shareTicket in App.onLaunch or App.onShow. By calling the wx.getShareInfo API, they can get forwarded information by passing in shareTicket.

Initiating Forwarding in the Page

Start from base library version 1.2.0. Please remaining backward compatible.

By setting the open-type="share" property for the component button, the Page.onShareAppMessage event can be triggered after the user taps the button. If this event is not defined in the current page, it cannot be triggered after tapping. Related component: button

User Guide

The forward button is designed to help users share content and services with friends more easily. They can forward anything independently at any time. Developers may create a better user experience by following the guidelines below.

  1. Concise meaning: Button images should be clear and recognizable, which reduces the time the user requires to understand its usage. Such button media can be found in our resource download center for direct use, or you can create your own button samples that convey meaning clearly according to the style of your business design. Of course, you can also directly use the ready-made button Forward to friends, which is also concise enough.
  2. Easy to tap: The tap area of the button should not be too small or too big. Besides, the forward button is just like other buttons, their tap areas should not be too close together to prevent incorrect operation.
  3. Shown as needed: The forward button is not suitable for every page. This feature is not recommended for non-public content that involves user privacy, or scenarios where the user's ongoing operation may be interrupted. As we will use the user's screen images as the sample images in the forwarding process, the user's personal information must be hided.
  4. Respecting what the user wants: Not every user would like to share your Mini Program with friends. Therefore, this should not be an induced or compulsory action, e.g. only allowing certain features to be unlocked after forwarding. Note that such practices are not recommended and may be in violation of our Operating Regulations. We strongly suggest that you read this content before using.

What listed above are some of the key points. See the complete Design Guidelines for more information.

Tips

  1. If the forwarded image is not defined, the current page will be taken by default, starting from the top with a height 80% of the width of the screen.
  2. For debugging, see General forwarding and Forwarding with shareTicket.
  3. The shareTickets return value can only be obtained by forwarding the Mini Program to group chats.
  4. The shareTicket remains effective only within the current Mini Program's lifecycle
  5. Due to policy changes, capabilities of the Mini Program group are being adjusted. Developers can use the group ID of the wx.getShareInfo API for development.