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