This project is read-only.

Infinite Sessions

Jan 29, 2009 at 4:50 PM
Hi All,
Can i force my facebook app to give out an infinite session by default.
I'm using the code below to redirect the user to connect to facebook.

 

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

 

Response.Redirect(

"http://www.facebook.com/login.php?api_key=" & _facebook.ApplicationKey & "&v=1.0")

 

 

End Sub

 


What i would like to do is pull the userid and sessionkey from the facebook object and store it. So when a user updates their site, i can use their user id and session key to create an instance of the facebook object and post notifications to their friends. This is the code that catches the authToken, after the user has logged into facebook. 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

_facebook.ApplicationKey = FaceBookApplicationKey

_facebook.Secret = FaceBookSecret

_facebook.IsDesktopApplication =

False

 

_authToken = Request.QueryString(

"auth_token")

 

 

If Not String.IsNullOrEmpty(_authToken) Then

 

_facebook.CreateSession(_authToken)

 

End If

 

 

End Sub

 

 

 

 


When i create this session though the session expires after a period of time. Is there anything i can do to automatically get an infinite session for each user