Facebook 应用程序 ->在我的网站上?

发布于 2024-10-07 14:31:08 字数 485 浏览 0 评论 0原文

基本上,当有人访问我网站上的 X 页面时,我希望有一个“内容拦截器”,显示一个弹出窗口,要求他们允许/拒绝我的 Facebook 应用程序。

如果他们允许,它会删除内容拦截器并显示内容,并且如果他们登录 Facebook,则不再显示内容拦截器,因为他们已经允许我的应用程序。

如果他们拒绝,它会删除内容拦截器并显示内容,但如果他们登录 Facebook 并且不允许我的应用程序,它将始终显示内容拦截器。

我基本上希望它像这样工作:

http://tyler.tc/FBLike/

但是我希望它包含我的应用程序,而不是显示一个带有 Like 的框 - 我希望它看起来像这样:

http://i56.tinypic.com/vi1xzc.jpg

有什么方法可以做到这一点吗?

我非常感谢您的反馈,因为我是 Facebook 开发的新手。

问候。

Basically, when someone visits X page on my website, I want there to be a "content blocker" which shows a popup asking them to Allow/Deny my facebook application.

If they Allow it, it removes the content blocker and shows the content and never shows the content blocker again if they are logged in to facebook as they have already allowed my application.

If they deny it, it removes the content blocker and shows the content but it will always show the content blocker if they are logged in to facebook and not allowed my application.

I basically want it to work like this:

http://tyler.tc/FBLike/

But instead of it showing a box with Like in it, I want it to contain my application - which I want to look something like this:

http://i56.tinypic.com/vi1xzc.jpg

Is there any way I can do this?

I would really appreciate feedback as I'm new to Facebook developing.

Regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘初心 2024-10-14 14:31:08

如果您使用的是 Facebook Graph API,此处有一些有关如何执行该对话框的文档。基本上,您可以创建一个 iframe,并将其源设置为此 URL:

https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=...&type=user_agent&display=popup

client_id 设置为您的应用程序 ID,将 redirect_uri 设置为服务器的 URL可以检索用户的身份验证令牌的端处理程序。

If you're using the Facebook Graph API, there is some documentation for how to do that dialog here. Basically, you can create an iframe with its source set to this URL:

https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=...&type=user_agent&display=popup

Set client_id to your application ID and redirect_uri to the URL of a server-side handler that can retrieve a user's auth token.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文