O'Reilly logo

Flash Multiplayer Virtual Worlds by Makzan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required