关联 Facebook 应用程序中的 Facebook 粉丝页面 ID
我正在开发一个 Facebook 应用程序,需要在加载时获取以下信息。
- 添加应用程序的 Facebook 粉丝页面 URL / ID。
- 从特定页面访问此应用程序的用户是否是该页面的管理员。
我正在 ASP.Net 中开发此应用程序,并使用 Facebook Graph API。
非常感谢任何帮助。
I am developing a facebook application which required to get below information while load.
- Facebook Fan Page URL / Id on which the application has been added.
- If the user who is accessing this application from specific page is admin of that page or not.
I am developing this application in ASP.Net and I am using Facebook Graph API.
Any help is highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
让我分享一些见解
首先,我强烈建议您使用 Microsoft 的 Facebook C# SDK 而不是使用普通调用在您的 .NET 项目中。
步骤
使用当前的 API,您可以在管理页面中执行此操作
manage_page
)http://facebook.com/add.php?api_key=[API_KEY]&pages=1&page=[PAGE_ID]
现在您的应用程序已在用户页面上运行,您需要一个检查该页面是否作为选项卡在 Facebook 内部运行以及运行的页面 ID 是什么的方法。
signed_request
并验证Data
,因为它具有您需要的["page"]["id"]
,以便您可以检查您应该保存的Page_Id已保存在当您的用户将您的应用程序添加到其 Facebook 页面时的管理区域。我希望这有帮助。
代码
登录并请求所有用户页面:
从您的应用获取页面 ID:
Let me share some insights
Firstly, I would strongly suggest that you use Microsoft's Facebook C# SDK instead of using plain calls in your .NET project.
Steps
With the current API, you can do this in your ADMIN Page
manage_page
)http://facebook.com/add.php?api_key=[API_KEY]&pages=1&page=[PAGE_ID]
Now that you have your app running on the user page, you need a way to check if that page is running inside Facebook as a Tab or not, and what's the Page Id that is running from.
signed_request
and verify theData
as it has the["page"]["id"]
that you need so you can check against the saves Page_Id that you should have saved on the ADMIN area when your user adds your app to it's facebook page.I hope this helps.
Code
To login and request all user pages:
To get the Page ID from your app: