开发者

OpenGraph linter can't find the url or can't read the meta tags

I have this weird error where sometimes the FB linter grabs my content but says it can't find the meta tags while sometimes it says it can't find the content at all.

I checked my apache logs and FB calls me properly both time:

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.p开发者_如何学Pythonhp)"

First one the linter says I miss og:* properties, the second one the linter says the page could not be reached.

Here is the html code for both pages:

<!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"/>

Solved

FB needs to ping the URL you submit to the linter (or to the graph API) but also needs to ping the URL mentioned in og:url.

My dev setup is a bit weird, it's basic auth protected and the OpenGraph URL are whitelisted in a proxy. Using the same URL I submit for og:url fixed the issue.


add the Open Graph Protocol namespace attribute to the tag:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 
    lang="en" dir="ltr" xmlns:og="http://ogp.me/ns#">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜