FrontlineSMS let users send, receive and manage SMS over a mobile network.


Just a short sharing of info on how to connect frontlineSMS to post to a twitter account.

1. Get "cURL" (
2. Open the .zip archive and copy the "curl.exe" to "C:\curl.exe".
3. Start frontlineSMS
4. Add (or Edit) a Keyword and choose "External Command"
5. Type this in the command box:

C:\curl.exe -u twittername:twitterpassword  -d "status=${message_content}"

twittername / twitterpassword is your name and password on twitter

6. Test by SMS:ing the keyword and a message. the message content will show up in your twitter feed.

Views: 142

Reply to This

Replies to This Discussion

Hi Mattias,

Thanks for the HOWTO - very neat!



Twitter has disabled basic auth. If you can call a PHP script from your FLSMS instance, you can use oAuth with PHP. Check the docs in Twitter to get the tokens, key and secret for your account.


This is what I'm using. It will require a direct connection to the Internet. If you want to bridge to Twitter over SMS you need to add a "forward" action to one of you keywords, as shown here

The oAuth library is here



require_once 'TwitterOAuth.php';

define("CONSUMER_KEY", "my key");
define("CONSUMER_SECRET", "my secret");
define("OAUTH_TOKEN", "oAuth token");
define("OAUTH_SECRET", "oAuth secret");

//Get the message from the command

$connection->format = 'xml';
$content = $connection->get('account/verify_credentials');

//Show credential verification output
//echo $content;

$message = preg_replace('/[^-a-zA-Z0-9_ ]/', '', $message);
echo $message;

//Post to Twitter
$connection->post('statuses/update', array('status' => $message));
Thanks for the update, Pablo ! ;-)

Reply to Discussion


© 2017   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service