Popfly & The Login

Jul 17, 2007 at 6:23 PM
Is it possible to avoid the login page exactly as Microsoft does through Popfly?

Hope somebody can do it among us : )

Jessica xxx
Jul 18, 2007 at 3:54 PM
There is a concept called infinite sessions that you can leverage in 1 of 2 ways (depending on your app)

1) If your app does not require facebook user context (either to lookup info about the user, or to save things to their profil), you can have your app always login as you (after you establish an infinite session). For some apps, this is perfectly acceptable and always avoids the login page.
2) If your app does require user context, the only thing you can do is check if a user established an infinite session when they first login to your app. If they did, you can store their sessionkey and userid and reconnect to their infinite session on subsequent interactions with your app.

In either case, you need the api, secret, userid and sessionkey for an infinite session. If you set all 4 of these properties on the FacebookService prior to making any calls, the login will be avoided.
Jul 27, 2007 at 8:03 PM
Hi there

Thanks for all the help!

I have a Desktop app and would like to use the Infinite Session Concept.

I instantiated a FaceBookService and set IsDesktopApplication = True.
I set the ApplicationKey and Secret.
When Connecting to FaceBook for the first time I check the SessionExpires property and save the SessionKey and UserID if it is set to False.

The next time I log in I set the Saved SessionKey and UserID properties on the FaceBookService and yet when calling the ConnectToFaceBook method I still get the FaceBook Login Prompt.

Is there something I'm missing?
Thanks again for all the help.

Code Snippet

FacebookService = New Facebook.Components.FacebookService()
FacebookService.IsDesktopApplication = True
FacebookService.ApplicationKey = My.Settings.APIKey
FacebookService.Secret = My.Settings.secret

If Not My.Settings.KeepLoggedIn Then


_If Not FacebookService.SessionExpires Then

My.Settings.KeepLoggedIn = True
My.Settings.SessionKey = FacebookService.SessionKey
My.Settings.UserID = FacebookService.UserId

My.Settings.KeepLoggedIn = False
End If


FacebookService.SessionKey = My.Settings.SessionKey
FacebookService.UserId = My.Settings.UserID
End If
Jul 27, 2007 at 9:48 PM

I just read the thread:

I see that it needed the Facebook Generated Secret.
That solved my problem.