The company has a public account. to implement such a function, users can publish an emoticons to the public account at will. The system automatically returns an article or music with a proper emoticons; as for how to implement it, I will not elaborate on it. You can read this article and the public platform API documentation. Here is a simple example of the built-in emoticons.
The company has a public account. to implement such a function, users can publish an emoticons to the public account at will. The system automatically returns an article or music with a proper emoticons; as for how to implement it, I will not elaborate on it. You can read this article and the public platform API documentation. Here is a simple example of the built-in emoticons.
The company has a public account;
To implement such a function, the user can publish an expression to the public account at will;
The system automatically returns an article or music function for the expected expression;
I will not elaborate on how to implement it. You can read this article and the public platform API documentation.
Here is a simple example of the string code corresponding to the built-in emoticon, which is convenient for developers and marketing personnel to use;
If the Public Account uses the development mode, you can set the built-in emoticon as a keyword to perform matching search and return relevant information, articles, images, and songs;
Because we are engaged in traditional media, the keywords converted into expressions must be related to the media content;
The code snippet is as follows (Php ):
If you are a lazy student, you can click here to copy the source code directly. You wanted to use the regular expression preg_replace, but the regular expression is annoying by slashes and other special symbols, and I forgot the regular expression, therefore, we will not consider this much. directly use the str_replace () function;
That's simple!
Search for a public account:Magicfashion,Add[Magic Mirror fashion]For testing;
The reply content does not match the emoticon image very well. Keyword matching still needs to be optimized. Currently, this is only a test version;
However, I personally think it is quite interesting to have an automatic reply. If you have resources, you can even make a [Recommended mood songs], [Recommended mood pictures], and [Recommended mood phrases ], [Recommended mood products] And so on ~
Xiaoqi threw a brick here. Let's make your own Jade ~
Emoticon-code-keywords (table ):
Note: If you want to use the interface to reply to a user's expression, you can also use the following string code ~~~
Emoticons |
String code |
Replace keywords |
|
/::) |
Smile |
|
/::~ |
Sad |
|
/: B |
Beauty |
|
/: | |
Daze |
|
/: 8 -) |
Sunglasses |
|
/: < |
Cry |
|
/: $ |
Shame |
|
/: X |
Dumb |
|
/: Z |
Sleep |
|
/::'( |
Cry |
|
/:-| |
Bytes |
|
/::@ |
Angry |
|
/: P |
Naughty |
|
/: D |
Smile |
|
/: O |
Surprised |
Emoticons |
String code |
Replace keywords |
|
/::( |
Sad |
|
/: + |
Cool |
|
/:-B |
Khan |
|
/: Q |
Crazy |
|
/: T |
Vomit |
|
/:, @ P |
Smile |
|
/:, @-D |
Happy |
|
/: D |
Odd |
|
/:, @ O |
Pride |
|
/: G |
Ele. Me |
|
/: | -) |
Tired |
|
/::! |
Scare |
|
/: L |
Khan |
|
/:> |
Happy |
|
/::,@ |
Idle |
Emoticons |
String code |
Replace keywords |
|
/:, @ F |
Effort |
|
/:-S |
Scold |
|
/:? |
Question |
|
/:, @ X |
Secret |
|
/:,@@ |
Chaos |
|
/: 8 |
Crazy |
|
/:,@! |
Mourning |
|
/:!!! |
Ghost |
|
/: Xx |
Attack |
|
/: Bye |
Bye |
|
/: Wipe |
Khan |
|
/: Dig |
Bytes |
|
/: Handclap |
Applaud |
|
/:&-( |
Bad |
|
/: B -) |
Spoof |
Emoticons |
String code |
Replace keywords |
|
/: <@ |
What |
|
/: @> |
What |
|
/:-O |
Tired |
|
/:>-| |
View |
|
/: P -( |
Sad |
|
/: '| |
Sad |
|
/: X -) |
Bad |
|
/::* |
Kiss |
|
/: @ X |
Scare |
|
/: 8 * |
Poor |
|
/: Pd |
Knife |
|
/: |
Fruit |
|
/: Beer |
Liquor |
|
/: Basketb |
Basketball |
|
/: Oo |
Ping pong |
Emoticons |
String code |
Replace keywords |
|
/: Coffee |
Coffee |
|
/: Eat |
Food |
|
/: Pig |
Animals |
|
/: Rose |
Flowers |
|
/: Fade |
Dry |
|
/: Showlove |
Lip |
|
/: Heart |
Love |
|
/: Break |
Break up |
|
/: Cake |
Birthday |
|
/: Li |
Electricity |
|
/: Bome |
Bomb |
|
/: Kn |
Knife |
|
/: Footb |
Football |
|
/: Ladybug |
Insects |
|
/: Shit |
Smelly |
Emoticons |
String code |
Replace keywords |
|
/: Moon |
Moon |
|
/: Sun |
Sun |
|
/: Gift |
Gift |
|
/: Hug |
Partner |
|
/: Strong |
Like |
|
/: Weak |
Difference |
|
/: Share |
Handshake |
|
/: V |
Excellent |
|
/:@) |
Gong |
|
/: Jj |
Check |
|
/:@@ |
Top |
|
/: Bad |
Bad |
|
/: Lvu |
Love |
|
/: No |
No |
|
/: OK |
Okay. |
Emoticons |
String code |
Replace keywords |
|
/: Love |
Love |
|
/: |
Kiss |
|
/: Jump |
Hop |
|
/: Shake |
Afraid |
|
/: |
Scream |
|
/: Circle |
Circle |
|
/: Kotow |
Worship |
|
/: Turn |
Back |
|
/: Skip |
Hop |
|
[Waving] |
Angel |
|
/: #-0 |
Excited |
|
[Street Dance] |
Dance |
|
/: Kiss |
Kiss |
|
/: <& |
Yoga |
|
/: &> |
Taiji |
Original article address: the default code with emoticon. Thank you for sharing it.