Login page

Aug 7, 2007 at 11:58 PM
Why am I allways presented with "Facebook Login" page even when I select "Save my login info to avoid logging in to Facebook again to use this application."? Is this Facebook limitation or library?

Aug 8, 2007 at 11:11 AM
Are you talking about windows Apps? If so logging in normally only keeps you logged in for 1 hour - clicking the "Same my login info" keeps you logged in forever WHILST THE APPLICATION IS RUNNING. Close the app, and you need to log back in - very poorly worded login infomation unfortunatly.

The API dont really have much option about this as this is a facebook message in an Iframe.

Aug 8, 2007 at 6:53 PM
I bet that Facebook backend does not know that app was closed. I think that according to http://developers.facebook.com/documentation.php?doc=logindesktop there should be a way to login without prompting for credentials, may be same authtoken should be reused, but there is no way to save it in the library and it allways generates new one.
Sep 12, 2007 at 3:37 AM
Yes, there is. But, you need to store the sessionkey and secret associated with your user.

If you set all of them on your instance of the facebookservice prior to calling methods, you will not be required to login.

There is doc in our documentation around infinite session handling.
Dec 3, 2007 at 4:51 AM
Edited Dec 3, 2007 at 5:29 AM
I have actually tried this many times and keep getting an exception thrown "Incorrect Signature"

One thing I have noticed is that my SessionKey is always the same, every time I log on. Not sure if that could be a problem? Getting pretty frustrated on how easy this should be but is not working.

Here is the code I am trying to get this to work with a C# Desktop application. I run the program once, it saves the information. I run it again it throws an exception (Incorrect signature) on the fbService1.ConnectToFacebook() call.

public frmMain()
this.fbService1.ApplicationKey = Settings.Default.APIKey;

//set infinite session parameters on to facebook data adapter
if (Settings.Default.IsFacebookInfiniteSession)
fbService1.UserId = Settings.Default.UserId;
fbService1.SessionKey = Settings.Default.SessionKey;
//note here that we pass the secret that we saved
fbService1.Secret = Settings.Default.Secret;
//if we don't have an infinite session, we use my application's secret
fbService1.Secret = "my secret here";


private void frmMain_Load(object sender, EventArgs e)
//we invoke the UI dialog

//if the user let us save their session, throw it in config
if (!fbService1.SessionExpires)
Settings.Default.SessionKey = fbService1.SessionKey;
Settings.Default.UserId = fbService1.UserId;
Settings.Default.Secret = fbService1.Secret;
Settings.Default.IsFacebookInfiniteSession = true;

//friendList1.Friends = fbService1.GetFriends();