Getting friends list from Facebook

We implemented the buddy list by using the SmartFoxServer's buddy feature in a previous chapter. Users add those buddies when they meet each other inside the virtual world.

Thanks to the integration of the Facebook, we can get the friends list of the players and add them into the buddy list automatically. We create two tabs in the buddy list panel, one tab of the original buddy list and the other tab for the friends list from Facebook.

Getting friends list from Facebook

Similar to the getInfo command, we create a new FacebookCall to call the friend list.

var fbcall:FacebookCall = FacebookClient.fb.post(new GetFriends()); fbcall.addEventListener(FacebookEvent.COMPLETE, ...

Get Flash Multiplayer Virtual Worlds now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.