Home Backend Development PHP Tutorial WeChat Public Account Development Tutorial Part 12 - Sending Emoticons (Part 2)_PHP Tutorial

WeChat Public Account Development Tutorial Part 12 - Sending Emoticons (Part 2)_PHP Tutorial

Jul 20, 2016 am 11:12 AM
Down send develop WeChat Tutorial article of symbol expression

Introduction and article summary

The 11th article gives the code list of the Unified version of emoticons (emoji expressions), and introduces how to send emoji expressions in the WeChat public account development mode. It also sells it at the end of the article: "Little Some emoticons used in the q robot cannot be found in the emoticon selection column of WeChat, and they are not found in the emoticon code table (Unified version) given in the previous article. So how are these emoticons sent? ?" The symbolic expressions "couple" and "bus" are shown in the two pictures below.

 

This article mainly introduces the following contents: 1) How to use more emoticons on WeChat (that is, how to send emoji expressions that do not exist in the emoticon selection column of WeChat); 2) Gives a code comparison of the SoftBank version of emoticons Table; 3) Introduce and demonstrate how to send SoftBank version of emoticons. Let everyone completely play with the emoji expressions of WeChat public accounts!

How to use more emoticons on WeChat

Let’s first look at how, as a WeChat user, you can send some emoticons that are not listed in the WeChat emoticon selection column to your friends or WeChat public accounts. For example: What should I do if I want to use the two emoticons "couple" and "bus" used in the Xiaoq robot when chatting with friends on WeChat? Please take a look at the two screenshots below:

 

It can be seen that when we enter the full spelling "qinglv" of "couple" and the full spelling "gonggongqiche" of "bus" in the input box, the corresponding symbols will be automatically displayed in the text prompt list of the input method Expression, how about it, is it easy? There are many more such expressions, such as toilet, toilet, cash machine, etc.

Note: The author used the input method that comes with the iPhone 4S mobile phone system for testing. If you use Android or a third-party input method, that is a different matter.

SoftBank version of Emoji code list

As mentioned in the previous article, there are many versions of emoji, including Unified, DoCoMo, KDDI, Softbank and Google, and different versions use different Unicode codes to represent the same emoticon. This article gives the SoftBank (Japanese SoftBank Group) version of the emoji expression code table (generally called SB Unicode on the Internet, referring to it), as shown in the figure below:

How to send SoftBank version of emoticons to users from public accounts

In the WeChat public account development mode, sending the SoftBank version of emoticons is much simpler than sending the Unified version of emoticons. Simply write the SoftBank Unicode value corresponding to the emoticon in the program code and return it to the user. No need Do any processing.

Below, I give an example of sending the SoftBank version of emoticons. The code is as follows:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

package org.liufeng.course.service;

 

import java.util.Date;

import java.util.Map;

 

import javax.servlet.http.HttpServletRequest;

 

import org.liufeng.course.message.resp.TextMessage;

import org.liufeng.course.util.MessageUtil;

 

/**

 * 核心服务类

 *

 * @author liufeng

 * @date 2013-07-21

 */

public class CoreService {

    /**

     * 处理微信发来的请求

     *

     * @param request

     * @return

     */

    public static String processRequest(HttpServletRequest request) {

        String respMessage = null;

        try {

            // xml请求解析

            Map<String, String> requestMap = MessageUtil.parseXml(request);

 

            // 发送方帐号(open_id)

            String fromUserName = requestMap.get("FromUserName");

            // 公众帐号

            String toUserName = requestMap.get("ToUserName");

 

            // 回复文本消息

            TextMessage textMessage = new TextMessage();

            textMessage.setToUserName(fromUserName);

            textMessage.setFromUserName(toUserName);

            textMessage.setCreateTime(new Date().getTime());

            textMessage.setMsgType(MessageUtil.RESP_MESSAGE_TYPE_TEXT);

            textMessage.setFuncFlag(0);

            textMessage.setContent("自行车\ue136 男人\ue138 钱袋\ue12f 情侣\ue428 公共汽车\ue159");

            respMessage = MessageUtil.textMessageToXml(textMessage);

        } catch (Exception e) {

            e.printStackTrace();

        }

 

        return respMessage;

    }

}

Copy after login

The function of the above code is: no matter what type of message the user sends, it will return a text message containing 5 emoji expressions. If you don’t understand what’s going on with the CoreService class, please check out Part 5 of this series of tutorials, or you just need to look carefully at line 42 of the code to know how to put the SoftBank version of the emoji expression code in the Content of the text message. Finally, let’s take a look at the screenshot of the running effect:

Note: Each emoticon has its corresponding Unified unicode and Softbank unicode code. It does not mean that emoji expressions such as "couple" and "bus" that cannot be found in WeChat's emoticon column can only be By sending it through the method in this article, as long as you get the corresponding Unified unicode code, you can also use the method described in the previous article to send this type of emoticon.

Okay, this is the end of the explanation about sending emoticons to users from WeChat public accounts. I believe some friends have already started to use emoticons in their accounts after reading the tutorial. In fact, I hope that while copying the Unified version and SoftBank version of the emoticon code tables I pasted, you can also learn about the various versions of emoticons, Unicode encodings and supplementary codes, and continue to expand your knowledge. , draw parallels by analogy, only in this way can you truly turn the knowledge I explain into your own, and be able to adapt to changes by remaining unchanged.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444564.htmlTechArticleIntroduction and Article Summary The 11th article gives the Unified version of the emoticon (emoji expression) code table, and Introduced how to send emoji expressions in WeChat public account development mode, and also...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Advanced Bootstrap Tutorial: Mastering Customization & Components Advanced Bootstrap Tutorial: Mastering Customization & Components Apr 04, 2025 am 12:04 AM

How to master Bootstrap customization and component usage includes: 1. Use CSS variables and Sass preprocessor for style customization; 2. Deeply understand and modify component structure and behavior. Through these methods, a unique user interface can be created to improve the responsiveness and user experience of the website.

Ouyi Exchange app domestic download tutorial Ouyi Exchange app domestic download tutorial Mar 21, 2025 pm 05:42 PM

This article provides a detailed guide to safe download of Ouyi OKX App in China. Due to restrictions on domestic app stores, users are advised to download the App through the official website of Ouyi OKX, or use the QR code provided by the official website to scan and download. During the download process, be sure to verify the official website address, check the application permissions, perform a security scan after installation, and enable two-factor verification. During use, please abide by local laws and regulations, use a safe network environment, protect account security, be vigilant against fraud, and invest rationally. This article is for reference only and does not constitute investment advice. Digital asset transactions are at your own risk.

The difference between H5 and mini-programs and APPs The difference between H5 and mini-programs and APPs Apr 06, 2025 am 10:42 AM

H5. The main difference between mini programs and APP is: technical architecture: H5 is based on web technology, and mini programs and APP are independent applications. Experience and functions: H5 is light and easy to use, with limited functions; mini programs are lightweight and have good interactiveness; APPs are powerful and have smooth experience. Compatibility: H5 is cross-platform compatible, applets and APPs are restricted by the platform. Development cost: H5 has low development cost, medium mini programs, and highest APP. Applicable scenarios: H5 is suitable for information display, applets are suitable for lightweight applications, and APPs are suitable for complex functions.

What is the difference between H5 page production and WeChat applets What is the difference between H5 page production and WeChat applets Apr 05, 2025 pm 11:51 PM

H5 is more flexible and customizable, but requires skilled technology; mini programs are quick to get started and easy to maintain, but are limited by the WeChat framework.

What should I do if the company's security software conflicts with applications? How to troubleshoot HUES security software causes common software to fail to open? What should I do if the company's security software conflicts with applications? How to troubleshoot HUES security software causes common software to fail to open? Apr 01, 2025 pm 10:48 PM

Compatibility issues and troubleshooting methods for company security software and application. Many companies will install security software in order to ensure intranet security. However, security software sometimes...

Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Apr 19, 2025 pm 04:51 PM

Troubleshooting and solutions to the company's security software that causes some applications to not function properly. Many companies will deploy security software in order to ensure internal network security. ...

How to solve the problem of JS resource caching in enterprise WeChat? How to solve the problem of JS resource caching in enterprise WeChat? Apr 04, 2025 pm 05:06 PM

Discussion on the JS resource caching issue of Enterprise WeChat. When upgrading project functions, some users often encounter situations where they fail to successfully upgrade, especially in the enterprise...

How to choose H5 and applets How to choose H5 and applets Apr 06, 2025 am 10:51 AM

The choice of H5 and applet depends on the requirements. For applications with cross-platform, rapid development and high scalability, choose H5; for applications with native experience, rich functions and platform dependencies, choose applets.

See all articles