Twitter has now released the Emoji API for World Wide Web mobile app developers. The Twitter Emoji is open source and available to the developer community at large.
In this article, I am using the Twitter Emoji in the Web App. Now let's begin with the following procedure.
Getting Started
Now, we'll create the application and add the Twitter API to the application. Use the following procedure.
Step 1
Create the ASP.Net Web Application in Visual Studio.
Step 2
Add the Web Form to the application named "EmojiForm".
Step 3
Design the web form with the following code:
Note:
I am using some of the Twitter Emoji in my application. I have used "Your Emoji Code" here. Use the Emoji Code from the source code or you can find more Emoji from here.
Adding Twitter API Script
Now all you need to add is the following script to your web form:
Creating CSS and JavaScript for Web Application
Add the CSS file named "TwitterEmoji" and add the following code to it:
Add the JavaScript file named "TEmoji.js" and add the following code to it:
In the preceding code, the button click function determines if the emoji container class is not hidden; if it is not then it adds a hidden class otherwise it removes the hidden class. When the emoji list is displayed, the emoji is added to the text in the TextBox and it removes the hidden class. This is defined in the emoji list options click function. When the user clicks on the TextBox the emoji list disappears.
At first debug the application and enter the message and click on the Emoji icon as shown below:
Enter the message and select Emoji.
Click on the Send Button to send the message.
That's it.
Summary
This article described how to use the latest Twitter revealed Twitter Emoji in a web application. We can get more Twitter Emoji in the Github. Thanks for reading and Stay Updated!
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: