How to get UserId?

Jun 17, 2009 at 4:29 AM

Hi all,

I want to know how to get the userid of the logged in user? Is there any session variable provided by facebook?

Basically my requirement is like this: I am developing one application which will be in my facebook account. I want the User id of the user at runtime who uses my application.

Kindly help.



Jun 18, 2009 at 12:26 PM

FacebookService fbService = new FacebookService();

string fbUserId = fbService.UserId;

Jun 18, 2009 at 7:44 PM

I've been using


for pages setup with a master page of type facebook.web.CanvasFBMLMasterPage



for pages that do not use a master page and are just typed facebook.web.CanvasFBMLBasePage

Aug 18, 2009 at 6:13 PM

Does anyone know how to get the userid in a usercontrol page?  I cannot get it with the fbservice or anything