为Foursquare打开图表元数据

时间:2012-04-16 21:13:51

标签: api opengraph facebook-opengraph foursquare

save to foursquare api集成时是否可以仅使用Open Graph Data?

foursquare API声明:

  

为了保存到foursquare按钮在您的网站上运行,您的网站应包含hCard或OpenGraph位置元数据,以便foursquare知道您的网页所指的位置。

然而,当我使用以下数据加载页面时:

<head>
    <meta property="og:latitude" content="40.707992194260186"/>
    <meta property="og:longitude" content="-74.05560369801627"/>
    <meta property="og:street-address" content="222 Jersey City Blvd."/>
    <meta property="og:locality" content="Jersey City"/>
    <meta property="og:region" content="NJ"/>
    <meta property="og:postal-code" content="07305"/>
    <meta property="og:country-name" content="USA"/>
</head>

根据https://developers.facebook.com/docs/opengraphprotocol/

我得到“此页面找不到匹配的场地。”来自https://foursquare.com/business/brands/offerings/savetofoursquare/tester

我相信我应该收到以下地点:https://foursquare.com/v/liberty-science-center/4bf2e2fa6991c9b66e9f29e9

1 个答案:

答案 0 :(得分:3)

您必须提供一些其他信息(请参阅必需的Open Graph字段),尤其是标题:

<meta property="og:title" content="Liberty Science Center" />
<meta property="og:type" content="landmark" />
<meta property="og:latitude" content="40.707992194260186" />
<meta property="og:longitude" content="-74.05560369801627" />
<meta property="og:street-address" content="222 Jersey City Blvd" />
<meta property="og:locality" content="Jersey City" />
<meta property="og:region" content="NJ" />
<meta property="og:postal-code" content="07305" />
<meta property="og:country-name" content="USA" />
<meta property="og:phone_number" content="201-200-1000" />

这应该指向Liberty Science Center