What is the equivalent of require_login and require_add in ASP.NET

Aug 14, 2007 at 2:34 AM
In my canvas page (FBML), I want the ability to show the login screen (similar to the one that is shown by requirelogin in PHP) if the user has not done so already. This is because sometimes I get the fbsigsessionkey and fbsiguser and sometimes I dont. So, I want every user to go thro' the login screen and then add my application.
Please help.
Sep 12, 2007 at 4:43 AM
I attempted to solve this with the CanvasFBMLBasePAge? Have you looked at that?
Sep 12, 2007 at 5:59 AM
Yes. I was already using that. There was some weirdness when I selected the option to allow only developers to add the application. Finally, when I changed that option, the application started working smooth. Have you encountered / heard of similar issue?
Jan 16, 2008 at 4:27 PM

What is the equivalent of require_login and require_add in ASP.NET

I have a related question... Is there a way to use the FacebookService with some equivalent of require_login and require_add set to false, just to verify that a POST is actually coming from Facebook? I want to implement this in my PostRemove.aspx

I tried an asp.net equivalent of the PHP code from the wiki http://wiki.developers.facebook.com/index.php/Post-Remove_URL but it doesn't appear to be working, assuming because the user is no longer logged into my app at that point...

Private _fbService As Facebook.Components.FacebookService = New Facebook.Components.FacebookService()
_fbService.ApplicationKey = ConfigurationManager.AppSettings("FACEBOOK_API_KEY")
_fbService.Secret = ConfigurationManager.AppSettings("FACEBOOK_SECRET")
Dim userId As String = _fbService.GetLoggedInUser() 'THIS DOES NOT RETURN THE USER ID
userId = Request.Form("fb_sig_user") 'THIS RETURNS THE USER ID BUT NEED TO VERIFY SIGNATURE...

Any suggestions would be greatly appreciated...