- switch (strtolower($attr["property"])) {
- case "og:image":
- $siteinfo["image"] = $attr["content"];
- break;
- case "og:title":
- $siteinfo["title"] = $attr["content"];
- break;
- case "og:description":
- $siteinfo["text"] = $attr["content"];
- break;
- }
+ if ($attr["content"] != "")
+ switch (strtolower($attr["property"])) {
+ case "og:image":
+ $siteinfo["image"] = $attr["content"];
+ break;
+ case "og:title":
+ $siteinfo["title"] = $attr["content"];
+ break;
+ case "og:description":
+ $siteinfo["text"] = $attr["content"];
+ break;
+ }
+ }
+
+ if ($oembed_data->type == "link") {
+ if (isset($oembed_data->title) AND (trim($oembed_data->title) != ""))
+ $siteinfo["title"] = $oembed_data->title;
+ if (isset($oembed_data->description) AND (trim($oembed_data->description) != ""))
+ $siteinfo["text"] = trim($oembed_data->description);
+ if (isset($oembed_data->thumbnail_url) AND (trim($oembed_data->thumbnail_url) != ""))
+ $siteinfo["image"] = $oembed_data->thumbnail_url;