简体   繁体   English

如何从FB页面插件获取哪个用户喜欢页面

[英]How to get which user has liked page from FB page plugin

I used Facebook Page Plugin to display page like widget ( https://developers.facebook.com/docs/plugins/page-plugin ) on my site. 我使用Facebook Page Plugin在我的网站上显示诸如小部件( https://developers.facebook.com/docs/plugins/page-plugin )之类的页面。 When I run my site FB page widget is open with like and share buttons. 当我运行我的网站时,FB页面窗口小部件会用“喜欢”和“共享”按钮打开。 When user clicks on like it opens a popup and prompt user to enter FB login once user enters it and authenticated the widget is refreshed and now like button is greyed out. 当用户单击时,它会打开一个弹出窗口,并提示用户输入FB登录,一旦用户输入它并通过身份验证,便会刷新小部件,现在就像按钮变灰一样。 How do I know the user details who liked the page? 我如何知道喜欢该页面的用户详细信息? I want to save these details so that I can check if user has already liked the page or not if yes they can use the site directly if not then they must first like the page and then use the site. 我想保存这些详细信息,以便我可以检查用户是否已经喜欢该页面,如果可以,则可以直接使用该站点,否则,他们必须先喜欢该页面然后使用该站点。 My application is built on C# ASP.Net MVC. 我的应用程序基于C#ASP.Net MVC构建。 I also want the request to Facebook should go from it from C# code. 我也希望对Facebook的请求应该来自C#代码。 Let me know the correct process in case I'm not following correct procedure. 如果我没有遵循正确的程序,请告诉我正确的过程。

FB page like widget code is FB页面之类的小部件代码是

<div class="fb-page" data-href="https://facebook.com/codeblends" data-width="380" data-hide-cover="false" data-show-facepile="false" data-hide-cta="true"
             data-show-posts="false"></div>

In JS 在JS中

 window.fbAsyncInit = function () {
    FB.init({
        appId: '@ReadConfig.FacebookAppID',
        cookie: true,
        xfbml: true,
        version: '@ReadConfig.FacebookAPIVersion'        
    });

FB.Event.subscribe('edge.create', finished_rendering);
(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 = "https://connect.facebook.net/en_US/sdk.js";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

The only way to check if a user liked a Page is to authorize the user with the user_likes permission. 检查用户是否喜欢页面的唯一方法是使用user_likes权限授权该用户。 You would have to go through Facebooks review process with that permission, and Facebook will definitely not approve the usage for your case, because what you are trying to achieve is not allowed. 您必须获得该许可才能通过Facebook的审查程序,Facebook绝对不会批准您的案例的用法,因为您要达到的目的是不允许的。 Like gating is not allowed since many years. 自从多年以来,不允许门控。

You must read the platform policy: https://developers.facebook.com/policy/ 您必须阅读平台政策: https : //developers.facebook.com/policy/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用ASP.Net检查Facebook用户是否喜欢我的Facebook页面 - How to check whether a facebook user liked my facebook page or not using ASP.Net 如何将珍贵的页面(具有最后一个会话)从一个页面返回到另一个页面? - How return precious page(which has last session) from a page to another page? 尝试从Facebook签名请求中获取页面对象的喜欢的属性,但对象不存在 - Trying to get liked property of page object from Facebook signed request but object doesn't exist 如何从另一个页面隐藏具有用户控件的ModalPopupExenter? - How to Hide a ModalPopupExenter that has a User Control from another page? 如何知道哪个页面调用了Usercontrol - How to know which page has called the Usercontrol 如果Web应用程序具有嵌套的母版页,如何从另一个用户控件动态访问母版页上的控件 - How to access controls on a master page dynamically from another user control, if the web application has nested master page 如何从位于另一页上的TextBox中获取数据? - How to get data from TextBox, which located on the other page? 如何获取触发Post请求的页面的url? - How to get the url of the page from which a Post request was triggered? 如何确定用户来自登录页面还是sso页面 - How to determine user has come though login page or sso page 如何从用户控件获取页面URL路径 - how to get page url path from user control
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM