Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Graph 开放图形对象国际化:无刮擦/缺少参数fb\U区域设置_Graph_Localization_Internationalization_Facebook Opengraph - Fatal编程技术网

Graph 开放图形对象国际化:无刮擦/缺少参数fb\U区域设置

Graph 开放图形对象国际化:无刮擦/缺少参数fb\U区域设置,graph,localization,internationalization,facebook-opengraph,Graph,Localization,Internationalization,Facebook Opengraph,我在开放图形对象的国际化方面遇到了问题。我提供了og:locale和og:locale:alternate标记,但Facebook不会在不同的区域中抓取我的对象。在的对象调试器中,我可以看到og:locale:alternate被解析,并将它们显示为数组。但是单击其中一个会导致没有任何参数的刮伤。未提供fb_区域设置、区域设置或标题X-Facebook-locale 以下是一个示例对象: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transit

我在开放图形对象的国际化方面遇到了问题。我提供了og:locale和og:locale:alternate标记,但Facebook不会在不同的区域中抓取我的对象。在的对象调试器中,我可以看到og:locale:alternate被解析,并将它们显示为数组。但是单击其中一个会导致没有任何参数的刮伤。未提供fb_区域设置、区域设置或标题X-Facebook-locale

以下是一个示例对象:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta property="og:locale" content="en_US">
<meta property="og:locale:alternate" content="de_DE">
<meta property="og:locale:alternate" content="en_US">
<meta property="og:locale:alternate" content="fr_FR">
<meta property="fb:app_id" content="181576101937079">
<meta property="og:type" content="APP_NAMESPACE:level">
<meta property="og:url" content="http://apps.facebook.com/APP_NAMESPACE/?ogObjType=level&amp;ogObjId=0_0&amp;ogObjVariant=">
<meta property="og:title" content="Tree House Level 1">
<meta property="og:description" content="">
<meta property="og:determiner" content="the">
<meta property="og:image" content="https://URLTOIMAGE">
</head>
<body>
...
</body>
</html>

...
当我手工添加fb_locale=de_de时,它返回

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta property="og:locale" content="de_DE">
<meta property="og:locale:alternate" content="de_DE">
<meta property="og:locale:alternate" content="en_US">
<meta property="og:locale:alternate" content="fr_FR">
<meta property="fb:app_id" content="181576101937079">
<meta property="og:type" content="APP_NAMESPACE:level">
<meta property="og:url" content="http://apps.facebook.com/APP_NAMESPACE/?ogObjType=level&amp;ogObjId=0_0&amp;ogObjVariant=">
<meta property="og:title" content="Baumhaus Level 1">
<meta property="og:description" content="">
<meta property="og:determiner" content="the">
<meta property="og:image" content="https://URLTOIMAGE">
</head>
<body>
...
</body>
</html>

...
有人能告诉我为什么Facebook不抓取我的对象的本地化版本吗?

我也有同样的问题。 OG标签:

<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="en_GB" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="ru_RU" />
或locale=en_US

我的服务器收到了FB的请求,我收到了正确的答案

{"url":"http:\/\/gorokhovsky.nampohui.ru\/","type":"website","title":"Surfingbird - your personal web!","locale":{"locale":"en_us","alternate":["en_gb","ru_ru","fr_fr"]},"image":[{"url":"http:\/\/surfingbird.ru\/img\/logo-mailru2.gif?v=1"}],"description":"We pick interesting websites, photos and videos that you\u2019ll like.","site_name":"Surfingbird.ru","updated_time":"2013-02-27T15:04:20+0000","id":"356024197844717","application":{"id":"179736405468568","name":"Gorokhovsky2","url":"http:\/\/www.facebook.com\/apps\/application.php?id=179736405468568"}}
但是如果我设置locale=fr\u fr或ru\u ru,我会收到

"error":{"message":"Unsupported post request.","type":"GraphMethodException","code":100}
我的服务器没有收到FB的请求

如果我设置locale=ru\u-ru或fr\u-fr,它的工作方式就像locale=en\u-US


我认为使用区域设置字符的大小写是不正确的

尝试将区域设置en_us的大小写改为en_us。

这里也发生了同样的事情。有人知道怎么回事吗?嗨,马丁。我也有同样的问题,并创建了自己的线程(在找到你的之前)。看看我的(还有更多关于这个话题的问题):
"error":{"message":"Unsupported post request.","type":"GraphMethodException","code":100}