简体   繁体   English

Facebook缩略图和PHP重定向

[英]Facebook thumbnail and php redirect

this question is a follow up to this one . 这个问题是一个跟进到这一个

I have one server, with two domains associated with it (tactica.de and ibeat.us). 我有一台服务器,有两个与之关联的域(tactica.de和ibeat.us)。 Now in my root folder I put an index.php that redirects users to the appropriate page, like this: 现在在我的根文件夹中,我放了一个index.php,用户将用户重定向到相应的页面,如下所示:

<?php
$url = $_SERVER['HTTP_HOST'];
if (!eregi("ibeat",$url)) {
    header('Location: http://tacticadev.wordpress.com/');
}
else {
    header('Location: http://tactica.de/ibeat/index.html');
}
?>

Now when I put the URL's "www.ibeat.us/index.php", "www.tactica.de/index.php" or even just "www.tactica.de" in a facebook-status the thumbnail-pictures show appropriately. 现在,当我将URL的“ www.ibeat.us/index.php”、“www.tactica.de/index.php”或什至只是“ www.tactica.de”放置在Facebook状态中时,缩略图会正确显示。 If I just add "www.ibeat.us" it doesn't even load a thumbnail, just shows the link without picture immediately! 如果我仅添加“ www.ibeat.us”,它甚至不会加载缩略图,而是立即显示没有图片的链接! Does anybody here have experiences with this, he may share? 他可以分享这里的任何经历吗?

On http://tactica.de/ibeat/index.html the <link> tag is missplaced before the <head> tag. http://tactica.de/ibeat/index.html<link>标记位于<head>标记之前。 This malformed XHTML broke the facebook parser. 这个格式错误的XHTML打破了facebook解析器。 Also notice that facebook cache the content of shared links for a few minutes. 还要注意,facebook将共享链接的内容缓存了几分钟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM