WeChat Public Account Development tutorial 12th-Sending of symbolic emoticons (under) _php tutorial

Source: Internet
Author: User
Introduction and Article overview

The 11th article gives the unified version of the symbolic expression (emoji expression) code table, and describes how to send emoji expression in the public account development mode, but also at the end of the article, sold a Xiaoguanzi: "Small q robot used in some symbolic expression, in the symbol Expression selection column can not be found at all, And in the previous article given the Symbol Expression Code table (Unified version) also did not, then how these expressions are sent? "Lovers" and "buses" as shown in the following two images of the symbolic emoticons.

This article mainly introduces the following: 1 How to use more symbolic expressions (that is, how to send a emoji expression in the symbol Expression selection bar), 2) SoftBank version of the symbol expression of the code table, 3) introduced and demonstrated how to send SoftBank version of the symbolic expression. Let everybody play the emoji expression of the public account completely!

How to use more symbols on the emoticons

Let's take a look at how, as a user, you can send some symbolic emoticons to friends or public accounts that aren't listed in the emoji selection bar. For example: Small Q robot used in the "couple", "bus" two symbols expression, if I want to chat with friends to use, what should I do? Please look at the following two pictures:

It can be seen that when we enter "lovers" in the input box "QINGLV", "Bus" the full spell "Gonggongqiche", the Input method text prompt list will automatically display the corresponding symbol expression, how, is it easy? This kind of expression still has many, for example: toilet, toilet, teller machine and so on.

Description: I use the iphone 4S mobile phone system comes with the input method to do the test, if you use an Android, or a third-party input method, it is another matter.

SoftBank version of Emoji Expression Code table

As mentioned in the previous article, there are many versions of the emoji expression, including unified, DoCoMo, KDDI, SoftBank, and Google, and different versions of the Unicode code used to represent the same symbolic expression are not the same. This article gives the SoftBank (Japan SoftBank Group) version of the Emoji Expression Code table (commonly referred to as SB Unicode on the web, refers to it), as shown in:

How to send a SoftBank version of a symbolic expression to a user in a public account

In the public account development mode, send SoftBank version of the symbol expression is more simple than the unified version of the symbol expression, directly the symbol expression corresponding to the SoftBank Unicode value written in the program code to return to the user, no need to do any processing.

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

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;/** * Core Service class * * @author Liufeng * @date 2013-07-21 */public class Coreservice {/** * Processing Requests Sent * * @param request * @return */public static string ProcessRequest (HttpServletRequest request) {string Respmessag E = null;try {//XML request parsing map
 
  
   Requestmap = messageutil.parsexml (request);//Sender account (open_id) String fromusername = Requestmap.get ("Fromusername") ;//Public account String tousername = Requestmap.get ("Tousername");//reply text message 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 ("Bicycle \ue136 man \ue138 money bag \ue12f couple \ue428 bus \ue159"); respmessage = Messageutil.textmessagetoxml (TextMessage);} catch (Exception e) {e.printstacktrace ();}
return respmessage;}} 
  
 

The code above is to return a text message containing 5 emoji emoticons, regardless of what type of message the user sends. If you don't understand what's going on in the Coreservice class, check out the 5th article in this series, or you just need to look at the 42nd line of code and know how to put the SoftBank version emoji emoticons in the content of the text message. Finally look at the effect of the operation:

Description: Each symbol expression has the corresponding unified Unicode, Softbank Unicode code, not to say "couple", "bus" such as in the symbol expression column can not find the emoji expression only through the way of this article sent, As long as you get the corresponding unified Unicode code, you can use the method described in the previous article to send such emoticons.

All right, about the public account to send the user symbolic expression of the explanation of the end, I believe some friends after the tutorial has begun to use the symbol expression in the account. In fact, I would like you to copy my unified version, SoftBank version of the symbol Expression Code table, but also to understand the symbol expression of various versions, Unicode encoding and supplementary code related knowledge, and constantly expand their own knowledge, comprehend by analogy, So that I can really turn my knowledge into your own, can do status quo.


http://www.bkjia.com/PHPjc/444564.html www.bkjia.com true http://www.bkjia.com/PHPjc/444564.html techarticle Introduction and article Summary The 11th article gives the unified version of the symbolic expression (emoji expression) code table, and describes how to send emoji expression in the public account development mode, also ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.