当前位置:网站首页>Thoroughly understand the sharing function in wechat games
Thoroughly understand the sharing function in wechat games
2022-07-28 04:09:00 【51CTO】
hi ! Hello everyone , The ant is me . Welcome to my WeChat official account. 【 Little ants teach you to play games 】, Learn more original game development tutorials .
As a game , Sharing is essential , Especially for a wechat game , Its biggest advantage is that it can be easily shared with wechat .
In the wechat game making tool , There are not many building blocks related to sharing , Altogether 5 block .


As long as you master this 5 Usage of block log , You can easily realize various sharing functions in your game .
Before learning about sharing building blocks , Let's first take a look at the small game shared in wechat .

Pictured , For the dot guardian's sharing map , The top row shows “ Game icons ” and “ Game name ”, This is based on the game , Cannot be set manually . Then look at the second line “ Come and guard your home with dot !”, This is called “ Share the title ”, It can be set by building blocks , Next is a picture “ Sharing pictures ”( size 500 x 400) It can also be set by building blocks .
For the sharing of small games , We can set two parts , Part of it is “ title ”, Part of it is “ picture ”. After understanding the shared content , Next, let's take a look at these sharing blocks .
First block : Set sharing title xxxx. Now you know “ Share the title ” What is it , This building block is used to set “ title ” Of . You can set any text content you want to share , But here's one thing to note , Namely “ The number of words to share the title should be limited to 25 Within a word ”, because , exceed 25 The part of words will not display , Will use ellipsis instead .
We set the sharing Title , It must be hoped that it can arouse players' interest in playing games , So of course, we should show all the contents we want to show as much as possible , Instead of being replaced by ellipsis . in addition ,25 A word is actually long enough , The best shared copy should be with the minimum number of words , Highlight the biggest highlight in the game .
Second pieces : Set up to share pictures xxxx. This building block is set to share pictures , But there is no place for pictures in this building block , Instead, it gives an address bar , We need to fill in the address of the pictures to be shared in the address bar .
Wechat games have certain requirements for pictures to be shared , It is necessary to submit for approval in the background , After passing the audit , To get the link address of the picture . Get the link address , Fill the address in the building block of the shared picture .
At the bottom of the game setup page , There is one “ Customize the forwarding picture configuration ”. Click on “ Start configuration ” Button , You can enter the picture configuration page .

Here you can add the pictures you want to share ( size 500 x 400), And then submit it for review , After passing the audit , Click on “ Look at the original ” You can get links to pictures .

After getting the link , Just fill the link in the block of sharing pictures .
You can add many customized forwarded pictures , So we can configure different shared pictures and titles for different scenes or interfaces in the game .
Third pieces : Set sharing parameters xxxx. The function of this building block is to add some data for sharing , These data will not be displayed in the sharing card , They are hidden behind . Use this shared parameter , We can make some comparisons “ interesting ” The function of . for example , You can share the props in the game and give them to friends , You can share your designed level with your friends, etc . In refinement 1010 in , By configuring the level data into the sharing parameters , Realize the function of sharing your designed level with friends .
The method of sharing parameters is also very simple .

Pictured , Click the share button to share , Set the title and picture , With shared parameters “name=jack”, Finally called. “ Share ” Building blocks initiate sharing . In this way, the sharing parameter has been silently bound to this sharing .
that , For those who click on this share , How to get this parameter ?

Pictured , We used the last piece “ Get sharing parameters ” Building blocks , The shared parameters can be obtained through this building block , This parameter will be wrapped into a “ object ”, So here we use object building blocks to access the corresponding attributes “name” Value , You'll get a “jack”.
If you want to include multiple parameters in the sharing , What to do ? We can set multiple parameters with the help of objects .

When getting parameters , Just use object building blocks , Get the corresponding attribute of the object .

Fourth pieces : Share . Only after using this building block can we really initiate the sharing operation , Pop up sharing interface .
Last , In addition to using building blocks to set up shared content , We can also do that “ Work settings ” Configure sharing titles and pictures .

The default sharing title and icon are configured here . When you don't use building blocks to set titles and pictures in the game , By default, the settings here will be used for sharing . If you use building blocks in the game to set titles and pictures , Then the settings in the game will replace the default settings here .
Okay , This is all the content related to sharing in the wechat game making tool , Master these , You can realize various sharing functions according to your game .
Welcome to my WeChat official account. 【 Little ants teach you to play games 】, Learn more original game development tutorials .

边栏推荐
猜你喜欢

仿真测试断开服务器公网连接

Cookies and session

Do Netease and Baidu have their own tricks for seizing the beach AI learning machine?

21天,胖哥亲自带你玩转OAuth2

Adding DSP library to STM32F103 and its solution

Machine learning 06: Decision Tree Learning

Network visualization: features of convolution kernel and CNN visualization (through the attention part of gradient visualization network)

glusterfs 文件未挂载,权限: r-s

From Clickhouse to Snowflake: MPP query layer
![[untitled]](/img/6c/df2ebb3e39d1e47b8dd74cfdddbb06.gif)
[untitled]
随机推荐
金仓数据库KingbaseES安全指南--5.1. 数据库的传输安全
[untitled]
Summary of static blog building tools
Kingbasees Security Guide for Jincang database -- 4 data access protection
Several ways of connecting upper computer and MES
jdbc使用
仿真测试断开服务器公网连接
Leetcode 0141. circular linked list - three solutions
Network visualization: features of convolution kernel and CNN visualization (through the attention part of gradient visualization network)
[735. Planetary collision]
Cookies and session
Advanced Mathematics (Seventh Edition) Tongji University exercises 3-4 personal solutions (the last 8 questions)
Detailed explanation of pointer written test questions (C language)
Slice切片
【无标题】
一名合格的软件测试工程师,应该具备哪些技术能力?
常用的接口测试工具
RT thread changes the print serial port (add other functions on the basis of BSP)
Notes to subject 2
Read Plato farm's eplato and the reason for its high premium