相关疑难解决方法(0)

允许1个Facebook应用程序的多个域(如Tumblr)

我试图通过Facebook对象调试器验证我的网站,我遇到以下错误:

"smallteaser:teaser"类型的网址" http://www.example.com/latest "上的对象无效,因为指定的应用程序ID"597566643589666"不允许使用域"www.example.com".

这个错误非常有意义,因为我没有允许example.com域特定访问Facebook应用程序.但我真的需要吗?

我想要实现的与Tumblr在使用自定义域时的工作方式类似.比方说,例如,网站www.davidslog.com:它有以下元标记:

<meta property="fb:app_id" content="48119224995" />

   --> This is the Tumblr app ID


<meta property="og:url" content="http://www.davidslog.com/?og=1" />

   --> This is a custom domain which points to a Tumblr blog


<meta property="og:type" content="tumblr-feed:tumblelog" />

   --> This is a custom Tumblr object type (in namespace tumblr-feed)
Run Code Online (Sandbox Code Playgroud)

然后,如果您将其与例如域名theartofnotwriting.tumblr.com进行比较,该域具有以下元数据:

<meta property="fb:app_id" content="48119224995">

   --> This is the same Tumblr app ID

<meta property="og:url" content="http://theartofnotwriting.tumblr.com/?og=1">

   --> This is a different domain

<meta property="og:type" content="tumblr-feed:tumblelog">
Run Code Online (Sandbox Code Playgroud)

您可以清楚地看到相同的Tumblr应用程序有多个URL,一切都正确验证.

那么为什么这个Tumblr页面正确验证而我的页面没有?如何配置Facebook应用程序以允许在多个域上使用?

html html5 facebook facebook-graph-api facebook-opengraph

36
推荐指数
6
解决办法
6万
查看次数