php - Including links in text message using twilio API -



php - Including links in text message using twilio API -

how can include url in outgoing text message using twilio api? tried, message not sent. there specific format? syntax?

update: here's code: (i using php api) perhaps problem using variable in link? or maybe in different format?

$sms = $client->account->sms_messages->create( "xxx-xxx-xxxx", $send_to_number, "hey $var1. words words $var2. via example.com. see: https://graph.facebook.com/$fb_id/picture");

the example.com link works perfect, $var1 , $var2. when adding lastly link includes variable (and facebook graph api, don't think matters), message not sent. there way solve without url shortener?

sms messages sent via twilio limited 160 characters because carriers break messages 160 character sized chunks. these chunks doen't arrive in order, recommended send sort of pagination along message if expect on 160 chars.

https://www.twilio.com/help/faq/sms#sms-technical-3

the official twilio php helper library error out if effort send message longer 160 characters.

something else watch out for: if break message 2 lines have done here, php include characters used indentation in message, above code produce sms message looks this:

hey $var1. words words $var2. via example.com. see: https://graph.facebook.com/$fb_id/picture

php api url sms twilio

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -