【问题标题】:Website app age restricted likes and shares网站应用年龄限制喜欢和分享
【发布时间】:2012-01-03 08:16:24
【问题描述】:

我有一个包含酒精含量的网站,我已将其注册为 Facebook 应用程序。当我使用图形 API(https://graph.facebook.com/APP_ID?restrictions={"age_distribution":"21+"} 或 {"type":"alcohol"})设置应用程序限制时,应用程序链接Facebook 对未成年人账户是隐藏的,这很棒。

问题是,当一个以上年龄的人喜欢或分享网站上的一个页面时,他们的未成年朋友可以在以上年龄的人的个人资料墙上看到喜欢。有没有办法从未成年帐户的角度隐藏用户墙上的“喜欢”和“分享”帖子?我已经在其他网站上看到过这样做,但我自己无法复制它。

这是我在网站上使用的元标记和 javascript 调用:

<meta property="og:title" content="FB Restrictions"/>
<meta property="og:type" content="website"/>
<meta property="og:site_name" content="FB Restrictions Site"/>
<meta property="og:description" content="Testing Facebook Age Restrictions"/>   
<meta property="fb:app_id" content="MyAppID"/>

<script>

window.fbAsyncInit = function() {
FB.init({appId: 'MyAppID', status: true, cookie: true,xfbml: true});
};

(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

</script>

提前感谢您的帮助!

【问题讨论】:

    标签: javascript facebook-graph-api facebook-like facebook-apps


    【解决方案1】:

    根据Facebook's User Restrictions Documentation,您可以在您尝试限制的页面上使用以下 Open Graph 元标记:

    年龄限制

    <meta property="og:restrictions:age" content="21+"/>
    

    您还可以使用以下方法设置基于内容的酒精限制:

    <meta property="og:restrictions:content" content="alcohol"/>
    

    此外,您还可以设置国家限制:

    <meta property="og:restrictions:country:allowed" content="US" />
    
    <meta property="og:restrictions:country:disallowed" content="CN" />
    

    *请注意,标记中只能有一个:allowed 或一个:disallowed 实例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-29
      • 2017-06-27
      • 1970-01-01
      • 1970-01-01
      • 2016-11-13
      相关资源
      最近更新 更多