Should I See the Facebook Login Page Every Time I Connect?

Aug 9, 2009 at 10:35 PM

I'm doing some simple proof-of-concept code, and I'm not sure whether what I'm seeing is expected behavior.

When connecting from a desktop applcation, should I expect to see the Facebook login page every time?  Here's the code I'm working with:


Dim fbService As New facebook.Components.FacebookService
With fbService
	.IsDesktopApplication = True
	.ApplicationKey = "**removed**"
	.Secret = "**removed**"
	If My.Settings.SessionKey <> String.Empty Then
		.SessionKey = My.Settings.SessionKey
	End If
	If My.Settings.UserID <> String.Empty Then
		.uid = My.Settings.UserID
	End If

	My.Settings.SessionKey = fbService.SessionKey
	My.Settings.UserID = fbService.uid
End With

Now, what I would expect from this is that the FIRST time I run it, I get the Facebook login page, and then I shouldn't have to see the login page the second time I run this.  Is there a part of the process that I am missing?

Thanks in advance.


Aug 10, 2009 at 3:07 AM

This is because the Infinite sessions were deprecated with the new UI launch of Facebook. You will have to get a new session, or you can read the complete specifications about session on facebook develoeprs wiki under the section "About Session Keys" here,


Usman Ahmed

Aug 10, 2009 at 4:13 AM


So, this is a known issue with the Toolkit, then?

Or, is there some way to accomplish my goal via the Toolkit that I'm not seeing?



Aug 10, 2009 at 4:53 AM

Where is your service declared?:


Dim fbService As New facebook.Components.FacebookService

If this is done every time I would expect it to log out. Try moving this to module level.


Aug 10, 2009 at 1:38 PM


I understand what you're suggesting, but here's what I'm aiming for:

1. User starts my app

2. Login page opens, user logs into facebook, checks the "Keep me logged in" checkbox

3. User uses my app then closes it.

4. When the user starts my app the next time, I don't want them to have to see the Facebook login page again.

Is that possible through the Toolkit, or do I have to go "under the hood' and code it myself?



Aug 10, 2009 at 1:51 PM

DW: Sorry, I didn't realise what you are trying to do. Dunno. But from a 'reasonable design' point of view if they close my app they close my app.

Aug 11, 2009 at 2:16 AM

So, this is impossible through the toolkit?

Every desktop application that uses the toolkit requires their users to log into Facebook manually every time they use the application?

Aug 11, 2009 at 3:30 AM

You can request permissions through teh API, XFBML  lookup

 fb:prompt-permission   offline_access


Aug 11, 2009 at 3:32 AM

The Facebook documentation says that desktop sessions only last 24 hours.  Is this true?

If so, does the Offline Access permission override that?