# Forward

# Get more forwarding information

Usually developers want to forward the Mini Program to be opened a second time to get some information, such as the group identity. Now by calling the wx.showShareMenu And set the withShareTicket for true , when the user forwards the Mini Program to any group chat, the forwarding card is opened by other users in the group chat. App.onLaunch or App.onShow Get access to a shareTicketBy calling the wx.getShareInfo The interface passes in this shareTicket Forwarding information can be obtained.

# Initiate forwarding within the page

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

By giving button Component Settings Properties open-type="share", can be triggered after the user clicks the button Page.onShareAppMessage Events, related components:button

# Guidelines for Use

Forward button, designed to help users share content and services with friends more smoothly. Forward, should be spontaneous behavior of the user, and when needed at your fingertips. Developers will get a better user experience if they follow the following guidelines.

  1. Clear meaning: Clear, clear graphical buttons will reduce the time for users to understand. In our Resources Download Center, you can find such button material and use it directly. Or you can have the flexibility to design buttons with clear meaning according to the design style of your business. Of course, you can also just use the button with copy, "Forward to a friend," and it's clear enough.
  2. Easy to click: button hot zone should not be too small, should not too large. At the same time, the forwarding button and other buttons, the hot zone should not be too dense, so as to avoid user misoperation.
  3. On-demand presence: Not all pages are suitable for forwarding buttons, non-public content involving user privacy, or scenarios that may interrupt the user's current experience. At the same time, due to the forwarding process, we will capture the user's screen image as a picture, therefore, we need to pay attention to help users shield personal information.
  4. Respect the will: Granted, not all users like to share your Mini Program with their friends. Therefore, it should not be an inducement or compulsion, such as forwarding to unlock a function. Please note that such practices are not only not recommended, they may violate ourOperating Rules, we strongly recommend that you read this section before using it.

Above, we have listed the most important points. If you have time, you can browse them in fullDesign Guide"I think there will be more harvest.

# Note

  1. Without customizing the forwarded image, the current page will be taken by default, starting at the top, with a height of 80% Image of the screen width as a forward picture.
  2. Debugging support for forwarding please see [Debugging support for normal forwarding](../../Devtools /different.md#Ordinary forwarding.) and [belt shareTicket The forwarding of](../../Devtools /different.md#Forwarding with -shareticket-)
  3. When forwarding non-private messages, only forward to the group chat to open to get shareTicket Return value, single chat without shareTicketWhen forwarding private messages, both group and single chats are available shareTicketFor private messages see Private Message Usage Guide
  4. shareTicket Valid only for the current Mini Program life cycle
  5. Due to the policy change, the relevant capabilities of the Mini Program group are adjusted, and developers can use the wx.getShareInfo Groups in Interfaces ID Perform functional development.
  6. WeChat 7.0.12, support group leader forwarding Mini Program at the same time set the message as the group to do message, group to do message will appear in the form of a bubble at the bottom of the chat window. By default, each time a group to-do message is forwarded, a to-do message bubble is generated. adopt wx.updateShareMenu Interface modificationtoDoActivityIdProperty can aggregate multiple to-do messages into the same, i.e. forward the sametoDoActivityIdOnly one pending message bubble appears.toDoActivityIdNeed to be passed before forwarding updatableMessage.createActivityId Interface creation.