2

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.

Abdullah Khan
  • 2,384
  • 2
  • 22
  • 32

1 Answers1

1

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.

Yoni Shalom
  • 489
  • 4
  • 11
  • This doesn't appear to be true. Foursquare has implemented an older FBML widget at this url which pulls all the friends of the authenticated user, regardless of the friend's connection to Foursquare, and then allows the user to invite them to Foursquare. The problem is that FBML is deprecated and this functionality will not be available soon. I don't think there is a Graph way to do this. https://foursquare.com/invite/facebook – Scott Harwell May 25 '11 at 16:00