通过 Graph API 进行 Foursquare 风格的 Facebook 邀请

发布于 2024-10-01 03:06:37 字数 187 浏览 2 评论 0原文

我想让新注册的用户能够进行 Facebook 连接并选择他们的一些朋友并向他们发送访问我的网站的邀请。

当我注册 foursquare 时,我看到了这一点,我相信他们正在以特定的方式使用 Graph API 来实现这一目标。

我应该采取什么方法才能获得类似的结果?

我正在使用 PHP 和 JavaScript。

I want to allow newly signed up users to be able to do a facebook connect and select some of their friends and dispatch an invite to them for my website.

I saw this in action when I signed up for foursquare, I believe they are using the Graph API in a particular way to achieve this.

What approach should I take to get to similar results?

I am using PHP and Javascript.

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

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

发布评论

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

评论(1

花开浅夏 2024-10-08 03:06:37

您不得向通过 Facebook 授权您的用户的朋友发送消息。
Graph API 不允许这样做。

Foursquare 只允许 Facebook 好友且已授权 Foursquare 应用程序的人员之间建立联系。

过程是:

  • A和B是Facebook好友。
  • 一个授权的 foursquare(简称 FS)应用程序 - FS 有他们的电子邮件和 Facebook ID。
    B 授权 foursquare(与 A 没有任何关系)- FS 有他们的电子邮件和 Facebook ID。
  • FS 查找 B 的联系人,并将这些 facebook ID 列表与所有通过 facebook 注册 FB 的人的 ID 进行交叉引用。
  • 结果:B 的 Facebook 好友列表已在 Facebook 上授权 FS 应用程序。

由于 FS 已经拥有 A 的电子邮件 - 他们可以通过电子邮件发送请求。

You are not allowed to send messages to friends of a user who authorized you via Facebook.
The Graph API does not allow this.

Foursquare only allows linking between people who are buddies on Facebook AND already have authorized the Foursquare application.

The process is :

  • A and B are Facebook friends.
  • A authorized foursquare (FS for short) app - FS has their email and facebook ID.
    B authorized foursquare (without any relation to A) - FS has their email and facebook ID.
  • FS looks up B's contacts, and cross-references the list of those facebook ID's with ID's of all the people who signed up to FB via facebook.
  • Result : list of people who are Facebook buddies of B AND have authorized FS app on facebook.

Since FS already has A's email - they can send the request via email.

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