AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Twilio send sms emoji from web app9/27/2023 Your best bet is to set up an intermediate server on the internet that uses an online SMS sending service and send the SMS via that route if you need complete automation. (Imagine if the game instead dialed 911 at a particular time of day) I'm sure you really want to have spams from your friends, "Try out this new game! It roxxers my boxxers, and yours will be too! !!!! If you sign up now you'll get 3,200 RB points!!"Īpple has restrictions for automated (or even partially automated) SMS and dialing operations. If you could send an SMS within a program on the iPhone, you'll be able to write games that spam people in the background. If you want to see the update, checkout: I also applied the u for unicode to all strings assigned to the message variable as well as added emoji code points/images to the messages. Applying messages.create method captured and preserved the unicode code point so it could be interpreted by the mobile device.įor the fix, I applied Rob's recommendation primarily to the last two lines of the code by replacing response.sms and the return with the and passing in the message variable to the body parameter. UPDATE: Part of the problem was applying the sms method to the message variable turned it into XML format which didn't preserve the unicode code point. Message = "Shall we play a game? %s " % questions # Stripped down answers to compare to text in case multiple word answer What am I?",Ģ: "What kind of tree is carried in your hand?", Response_letters = re.sub(r'\W+', '', submitted_txt)įrom_number = str(('From', None))Ġ: "What word is shorter when you add two letters to it?",ġ: "If I drink, I die. The current state of the code is as follows: # -*- coding: utf-8 -*-įrom flask import render_template, flash, redirect, session, url_for, request, jsonify, gįrom config import TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKENĬlient = TwilioRestClient(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) Any ideas or pointers on how to do this? Or is there a different approach someone would recommend? The gap appears to be how to isolate and pass a code point that the phone can interpret. Where I last landed is the following code which just prints out the unicode code point like a regular string on the mobile phone. ascii character set and encoding and decoding in utf-8. I've been working on understanding unicode vs. I'm trying to figure out how to pass a response that will show standard text and an emoji when its received by the sending phone. I built a quiz game in Python that works with the Twilio API so I can run the game through sms to my Twilio number.
0 Comments
Read More
Leave a Reply. |