我正在尝试使用Facebook对象调试器对我的网站进行验证,但遇到以下错误:
URL为“http://www.example.com/latest”的类型为“smallteaser: teaser”的对象无效,因为域名“www.example.com”未被允许用于指定的应用程序ID“597566643589666”。
这个错误很容易理解,因为我没有允许example.com域名特定访问Facebook应用程序。但是我真的需要吗?
我想要实现的类似于Tumblr在使用自定义域名时的工作方式。 例如,网站www.davidslog.com: 它有以下meta标记:
<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)
如果你将这个与例如域名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">
你可以清楚地看到,同一个Tumblr应用程序具有多个URL,并且所有内容都正确验证。
那么为什么这个Tumblr页面可以正确验证,而我的不能呢?如何配置Facebook应用程序以允许在多个域上使用?