0
我有这个奇怪的错误,有时FB linter抓住我的内容,但说它不能找到meta标签,有时却说它不能根本找不到内容。OpenGraph linter无法找到网址或无法读取meta标签
我检查我的Apache日志和FB打电话给我正确了时间:
69.63.181.244 - - [12/Oct/2011:11:02:07 -0700] "GET /~gilles/www/gillesdevaux/outbox/248227866689405176 HTTP/1.1" 200 8339 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
69.63.181.244 - - [12/Oct/2011:11:02:09 -0700] "GET /~gilles/www/gillesdevaux/outbox/248158254941601902 HTTP/1.1" 200 8104 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
首先一个棉短绒说我错过OG:*属性,第二个中的棉短绒说页面无法达到。
下面是两个页面的HTML代码:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# mytest: http://ogp.me/ns/fb/mytest#">
<title>opengraph picture + link | Formspring</title>
<base href="https://testserver/~gilles/www/" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="opengraph picture + link" />
<meta name="keywords" content="" />
<meta property="fb:app_id" content="201652911907"/>
<meta property="og:title" content="opengraph picture + link"/>
<meta property="og:type" content="mytest:question"/>
<meta property="og:url" content="https://testserver/~gilles/www/gillesdevaux/outbox/248227866689405176"/>
<meta property="og:image" content="http://testserver/photos/20111011/n4e94d0e273403.jpg"/>
<meta property="mytest:link" content="http://en.wikipedia.org/wiki/Cheese"/>
解决
FB需要来ping您提交给棉短绒(或图形API)的URL,但也需要来ping在og:url中提到的网址。
我的开发设置有点奇怪,它的基本身份验证受保护,OpenGraph URL在代理中列入白名单。使用我为og:url提交的URL修复了问题。
嗨。显然它并不重要,它可以在
中。该opengraph测试版建议这种方法通过 –