]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
You need an API key when using embed.ly. Unfortunatly oembedhelper.php does not suppo...
authorJean Baptiste Favre <statusnet@jbfavre.org>
Wed, 29 Aug 2012 19:36:55 +0000 (21:36 +0200)
committerJean Baptiste Favre <statusnet@jbfavre.org>
Sat, 15 Jun 2013 16:35:41 +0000 (18:35 +0200)
lib/oembedhelper.php

index 903f80c581a03b92a17ec5f2a698809d9c307cab..6b5b8d34f2bd2139b82f2a817e0574a994df1675 100644 (file)
@@ -216,6 +216,10 @@ class oEmbedHelper
     {
         $params['url'] = $url;
         $params['format'] = 'json';
+        $key=common_config('oembed','apikey');
+        if(isset($key)) {
+            $params['key'] = common_config('oembed','apikey');
+        }
         $data = self::json($api, $params);
         return self::normalize($data);
     }