Facebook 2.0 Online Friends

Dec 21, 2008 at 8:56 PM

I am using facebook toolkit 2.0 in Visual Studio 2008. Therefore, I want to see online friends in profile class. Is there any facebook.dll that include seeonline friends and send message to the friends. If it is not, how can i convert source code to the dll for facebook toolkit and what is the way for seeonlinefriends and send message to the friends. On the other hand, I want to get status for my friends. Therefore, i learned that application users must give access privilage to  the application. How can i do this? Lastly,i want to write code in iframebase page and i planned to make invite page to the friends with c#. Is there any sample for invite page for iframe application in asp.net with facebook development kit 2.0.

Dec 24, 2008 at 10:41 PM
You can fetch the list of online friends using FQL like this:

string result = fql.query("SELECT uid,online_presence FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 ={0})");

Where you replace {0} with the uid of the logged in user. You can get the results in either XML or JSON (see UseJson property)