sfMelodyPlugin icon indicating copy to clipboard operation
sfMelodyPlugin copied to clipboard

How do I save Access token and secret for future use?

Open savannahbeckett opened this issue 14 years ago • 4 comments

I don't want my web application to ask user to grant access every hour. How do I save the ACCESS GET request for future use and save it to database? or can I save the access token and secret into the database? If so, what function should I call? Thanks.

savannahbeckett avatar Oct 07 '10 02:10 savannahbeckett

It's automatic but it's depend on the expiration of the token. Some tokens have expiration time some not.

All tokens for a connected user is stored and when the user isn't connected. You ask for a new token or to recognize an existing token.

Is that clear ?

chok avatar Oct 07 '10 07:10 chok

I understand, but I am trying to store the access token in my backend server for further connecting which has no interaction with user. So my frontend server will get the access token and do its own thing, then send the access token to my backend server for them to do more connecting.

savannahbeckett avatar Oct 07 '10 16:10 savannahbeckett

If you always need help sorry for the wait :D !

For the same connection (project) which share the same tables, if you have store tokens you can use in all of your applications.

chok avatar Oct 30 '10 14:10 chok

I think what savannahbeckett was getting at is possible the same thing I am trying to figure out how to do.

I want a way to delay the creation of a user until the visitor has completed a further details registration form.

So the user has the option of signing up with facebook connect or without. if they click the facebook connect option then the following happens.

  1. they are forwarded to facebook for authentication.
  2. they are returned to a registration page on my site with certain form fields pre populated.
  3. user fills out remaining fields and submits.
  4. all user information is saved to sf_guard_user table and token table as well as my profile table which contains the extra information.

How would i go about doing this?

danieljarrett74 avatar Mar 24 '11 19:03 danieljarrett74