require_once 'include/enotify.php';
use Friendica\App;
+use Friendica\Content\OEmbed;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Model\GContact;
function statusnet_convertmsg(App $a, $body, $no_tags = false)
{
- require_once "include/oembed.php";
require_once "include/items.php";
require_once "include/network.php";
logger("statusnet_convertmsg: fetching data for " . $expanded_url, LOGGER_DEBUG);
- $oembed_data = oembed_fetch_url($expanded_url, true);
+ $oembed_data = OEmbed::fetchURL($expanded_url, true);
logger("statusnet_convertmsg: fetching data: done", LOGGER_DEBUG);
*/
use Friendica\App;
+use Friendica\Content\OEmbed;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
function twitter_expand_entities(App $a, $body, $item, $no_tags = false, $picture)
{
- require_once "include/oembed.php";
require_once "include/network.php";
$tags = "";
if ($url->url && $url->expanded_url && $url->display_url) {
$expanded_url = original_url($url->expanded_url);
- $oembed_data = oembed_fetch_url($expanded_url);
+ $oembed_data = OEmbed::fetchURL($expanded_url);
// Quickfix: Workaround for URL with "[" and "]" in it
if (strpos($expanded_url, "[") || strpos($expanded_url, "]")) {