Home
Username:
Password:
Facebook Application Development Tutorials

Integration Points Greetings & Invitations / Excluding App Users




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

Well, you've seen how to send these invitations; what happens on the other end? Well, you can see that I have an invitation and I'm running under a different User ID now so that's why I'm receiving this invitation. Here's an invitation up here it says I have one, the logo would be here if I had a logo. I also have requests over here. I can click on either one and I will see the full text of the invitation and I can choose to Accept it if I want and what you'll see is that the text of the invitation is exactly the text that I created when I created the invitation itself as the other user. So I'm loading the invitation and I now have to confirm the request if I want to accept it. I see who sent the invitation, the Application that was used to send it and I can either Add the application or I can Ignore it. In this case I want to add the Application so I am finishing processing that invitation and now I have access to that Application and here I am in the Application and I could now invite my friends to it. You've seen how to send invitations in a variety of ways and you've seen what happens when you receive an invitation. There's one last thing that you need to see while we're on the subject of invitations and that is how to avoid inviting friends who already are using the App. There's an option, an attribute, called excludeIDs which will allow you to exclude from any of these selectors people who are already using the Application. You may remember the last time you saw this I had two friends here. I now only have one friend because the other friend already uses the Application. I've been using this to test so I know that, I've set it up and the way in which I have implemented this is to use a call from the Facebook api and that's what's happening up here. I'm calling the api client, the restlib and the method friends getAppUsers and that will tell me who, among my friends, is using the Application that is calling this method; in other words, who of my friends are using this particular Application. If I get anything back I will implode it into a comma delimited list and I use the php implode method, split it up into an Array and then I am setting excludeIDs to the attribute that I will need in the call to multi-friend-selector, so it will say excludeIDs equals and then the imploded Array, or if I got nothing back, if this was no then I simply won't have anything. I won't even have the attribute name. That's the setup. And then down here when I am calling multi-friend-selector I add this line of PHP code here to Echo excludeIDs which is either totally blank or the attribute name and the list of the user IDs of friends of mine who are already using the App so that I don't invite them twice or four times or twenty times. So this is a section of code the api callup here that will get those names and then down here adding the excludeIDs attribute to the multi-friend-selector.

Tutorial Information

Course: Facebook Application Development
Author: Jesse Feiler
SKU: 34058
ISBN: 1-935320-81-5
Release Date: 2009-11-23
Duration: 7.5 hrs / 92 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available