aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-24 21:26:50 -0700
committerfriendica <info@friendica.com>2012-03-24 21:26:50 -0700
commitd06ddeb1cc6c1bbc7c1f297a917714002839cf85 (patch)
tree9165d94773eca08786bd4390a298f53b229e55d2 /include/oembed.php
parent3ae43c24487450a749942ef4c3c19fa2a61461b6 (diff)
downloadvolse-hubzilla-d06ddeb1cc6c1bbc7c1f297a917714002839cf85.tar.gz
volse-hubzilla-d06ddeb1cc6c1bbc7c1f297a917714002839cf85.tar.bz2
volse-hubzilla-d06ddeb1cc6c1bbc7c1f297a917714002839cf85.zip
bug #346 - add oembed maxwidth to oembed request
Diffstat (limited to 'include/oembed.php')
-rwxr-xr-xinclude/oembed.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/oembed.php b/include/oembed.php
index cc71f9757..1f45d2814 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -38,7 +38,8 @@ function oembed_fetch_url($embedurl){
$entries = $xpath->query("//link[@type='application/json+oembed']");
foreach($entries as $e){
$href = $e->getAttributeNode("href")->nodeValue;
- $txt = fetch_url($href);
+ $txt = fetch_url($href . '&maxwidth=425');
+ break;
}
}
}
@@ -46,7 +47,7 @@ function oembed_fetch_url($embedurl){
if ($txt==false || $txt==""){
// try oohembed service
- $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl);
+ $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=425';
$txt = fetch_url($ourl);
}