Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the function of onShareAppMessage sharing parameters in WeChat Mini Programs

Shulou Source: shulou.com Published: 2022-06-01 00:29:34 09月21日 Update

This article mainly explains "what is the role of onShareAppMessage sharing parameters in WeChat Mini Programs". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the role of onShareAppMessage sharing parameters in WeChat Mini Programs?"

After adding the following code in Page (), three small white dots will appear in the upper right corner.

Title: the title of sharing.

Desc: share a description.

Path: this parameter is interesting. In the past, the sharing in Wechat was usually url. Here is the current page here should be pages/index?id=123 here id here do not know what it is.

In other words, you can share a page in Wechat like a web page.

OnShareAppMessage: function () {return {title: 'WeChat Mini Programs Alliance', desc: 'the most popular Mini Program Development Alliance!', path:'/ page/user?id=123'}}

The use of sharing parameters:

I do not use the parameters after the path here, say a scenario: parameters are user nicknames, A shares XXX Mini Program to WeChat group, B clicks Mini Program, clicks toast, "sharing from A".

At this point, I believe you have a deeper understanding of "what is the role of onShareAppMessage sharing parameters in WeChat Mini Programs". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Parameters programs functions content alliances pages learning practical deeper three that is popularity code interests scenarios practicality practicality meaning simple operation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Technology Linux MariaDB macOS