2011-11-21 128 views
4

我有一个网站的酒精含量,我已经注册为Facebook应用程序。当我使用图形API(https://graph.facebook.com/APP_ID?restrictions={"age_distribution":"21+“}或{”type“:”alcohol“})设置应用程序限制时, Facebook隐藏未成年帐户,这很好。网站的应用程序年龄限制喜欢和分享

问题是,当年龄较大的人喜欢或分享网页时,他们的未成年朋友可以在上述年龄段人物的个人资料墙上看到类似情况。从未成年账户的角度看,有没有办法在用户的墙上隐藏“喜欢”和“分享”帖子?我已经看到这与其他网站完成,但一直无法自己复制它。

这里是meta标签&调用我使用的网站上的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> 

谢谢!

限制由年龄

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

您还可以设置内容:

回答

1

Facebook's User Restrictions Documentation,您可以通过使用您要限制页面下面的Open Graph元标记这样做酒精使用:

<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实例中的标记。

相关问题