use Friendica\App;
use Friendica\Content\OEmbed;
+use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
$tweet = new TwitterOAuth($ckey, $csecret, $otoken, $osecret);
$max_char = 280;
- $msgarr = Plaintext::toPlaintext($b, $max_char, true, 8);
+ $msgarr = BBCode::toPlaintext($b, $max_char, true, 8);
$msg = $msgarr["text"];
if (($msg == "") && isset($msgarr["title"])) {
- $msg = Plaintext::shortenMsg($msgarr["title"], $max_char - 50);
+ $msg = Plaintext::shorten($msgarr["title"], $max_char - 50);
}
$image = "";
if (strlen($msg) && ($image == "")) {
// -----------------
$max_char = 280;
- $msgarr = Plaintext::toPlaintext($b, $max_char, true, 8);
+ $msgarr = BBCode::toPlaintext($b, $max_char, true, 8);
$msg = $msgarr["text"];
if (($msg == "") && isset($msgarr["title"])) {
- $msg = Plaintext::shortenMsg($msgarr["title"], $max_char - 50);
+ $msg = Plaintext::shorten($msgarr["title"], $max_char - 50);
}
if (isset($msgarr["url"])) {
}
}
- $msgarr = Plaintext::toPlaintext($item, $max_char, true, 8);
+ $msgarr = BBCode::toPlaintext($item, $max_char, true, 8);
$msg = $msgarr["text"];
if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) {