How can I include a url in an outgoing text message using twilio API? I tried, but the message was not sent. Is there a specific format? syntax?
Update:
Here’s the code: (I am using the php api)
Perhaps the problem is with using a variable in the link? or maybe in a 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, so do $var1 and $var2. But when adding the last link which includes a variable (and it is from facebook graph api, but I don’t think that matters), then the message is not sent. Is there any way to solve this without url shortener?
The message is too long.
There is a limit of characters in a twilio message. This has nothing to do with the variable. It now works, just shortened the text.