Merge pull request #3 from tobiasd/master

lowered tweet length to 138
pull/1/head
tobiasd 2011-10-14 05:46:56 -07:00
commit 0194c6998a
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ function twitter_post_hook(&$a,&$b) {
require_once('library/twitteroauth.php'); require_once('library/twitteroauth.php');
require_once('include/bbcode.php'); require_once('include/bbcode.php');
$tweet = new TwitterOAuth($ckey,$csecret,$otoken,$osecret); $tweet = new TwitterOAuth($ckey,$csecret,$otoken,$osecret);
$max_char = 140; // max. length for a tweet $max_char = 138; // max. length for a tweet
$msg = strip_tags(bbcode($b['body'])); $msg = strip_tags(bbcode($b['body']));
if ( strlen($msg) > $max_char) { if ( strlen($msg) > $max_char) {
logger('Twitter: have to shorten the message to fit 140 chars', LOGGER_DEBUG); logger('Twitter: have to shorten the message to fit 140 chars', LOGGER_DEBUG);