[Embed] Using oscarotero/Embed as first attempt to get oEmbed/OpenGraph data, fallback

to previous implementation otherwise.
This commit is contained in:
Miguel Dantas
2019-07-07 13:26:10 +01:00
committed by Diogo Cordeiro
parent b25632ebc4
commit 462ea26303
5 changed files with 61 additions and 41 deletions

View File

@@ -77,10 +77,10 @@ class File_embed extends Managed_DataObject
);
}
public static function _getOembed($url)
public static function _getEmbed($url)
{
try {
return oEmbedHelper::getObject($url);
return EmbedHelper::getObject($url);
} catch (Exception $e) {
common_log(LOG_INFO, "Error during oembed lookup for $url - " . $e->getMessage());
return false;