我有我的网页的HTML结构,如下所示。我已经添加了所有meta og标签,但Facebook仍然无法从我的网站上刮取任何信息。Facebook无法抓取我的网址
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html;" charset=utf-8"></meta>
<title>My Site</title>
<meta content="This is my title" property="og:title">
<meta content="This is my description" property="og:description">
<meta content="http://ia.media-imdb.com/images/rock.jpg" property="og:image">
<meta content="<MYPAGEID>" property="fb:page_id">
.......
</head>
<body>
.....
当我输入了Facebook调试器URL(https://developers.facebook.com/tools/debug),我得到以下信息:
Scrape Information
Response Code 404
Critical Errors That Must Be Fixed
Bad Response Code URL returned a bad HTTP response code.
Errors that must be fixed
Missing Required Property The 'og:url' property is required, but not present.
Missing Required Property The 'og:type' property is required, but not present.
Missing Required Property The 'og:title' property is required, but not present.
Open Graph Warnings That Should Be Fixed
Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
为什么Facebook的不读元标签信息?页面可以被访问,而不是隐藏在背后的登录等
UPDATE
好吧,我也调试一下,这是我发现的。我在我的目录中设置了htaccess规则 - 我使用PHP Codeigniter框架并使用htaccess规则从url中删除index.php。
所以,当我没有index.php的Facebook调试器(https://developers.facebook.com/tools/debug)提供的URL,Facebook显示404,但是当我用index.php提供url时,它能够解析我的页面。
现在我该如何让facebook在Facebook没有index.php的时候抓取内容?
这是我的htaccess规则:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
这是报告404(未找到)错误代码。有**必须**你的网址喂你的东西有问题。 – 2012-04-10 21:28:05
嗨克劳斯,我已经更新了我的问题,并进行了一些调试。请看看并让我知道您的意见 – Ninja 2012-04-11 07:02:02