Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:11:47+00:00 2026-06-14T05:11:47+00:00

I saved the Access Token (using this method: getAccessToken ()) in my database, but

  • 0

I saved the Access Token (using this method: getAccessToken ()) in my database, but now I would like to restore this value to an object.

How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:11:48+00:00Added an answer on June 14, 2026 at 5:11 am

    This is explained in hybridauth user manual with below code :

      // get the stored hybridauth data from your storage system
       $hybridauth_session_data = get_sorted_hybridauth_session( $current_user_id );
    

    Get_sorted_hybridauth_session is your internal function to get the stored data.
    It doesnt matter whether you store the data in a table in a field named ‘external_token’ or something, get it through a normal sql query, and then just feed it to below function :

       // then call Hybrid_Auth::restoreSessionData() to get stored data
       $hybridauth->restoreSessionData( $hybridauth_session_data );
    
       // call back an instance of Twitter adapter
       $twitter = $hybridauth->getAdapter( "Twitter" ); 
    
       // regrab te user profile
       $user_profile = $twitter->getUserProfile();
    

    $hybridauth->restoreSessionData( $hybridauth_session_data ); will restore the serialized session object, and then it will get an adapter for whichever provider it was saved for. Its best that you also save the provider name (Twitter in this case) in the same database table with something like external_provider , and then you can get it through a sql auery and feed it to getAdapter function. That should do what you need to do.

    The manual example is below :

    http://hybridauth.sourceforge.net/userguide/HybridAuth_Sessions.html

    =============

    As an added info – what i saw in my tests was, saving session in this way does not prevent hybridauth from logging the user in, even if the user has revoked access from the app in the meantime. Ie, if user is already logged in and authorized, but, went to the app separately and revoked the access (google for example), hybridauth will still log in the user to your system. Im currently trying to find a way to make sure the user is logged to the remote system too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this strings saved in my mysql database in format like: /uploads/attachments/18/105/WordPress_3_Cookbook.pdf Now,
I have a Data Access Object TransactionDao. When you call TransactionDao.Save(transaction) I would like
I saved some data in the database using mysql_real_escape_string() so the single quotes are
This might be an easy question, but I'd like your help with this. I
Once I receive my access token for a site (say facebook) using OAuth, how
How do I execute a saved query in MS Access 2007 in VBA? I
My application uses MS access database to save some sensitive information. Though that information
I saved my project.apk file, and I was reading this document: http://developer.android.com/guide/publishing/app-signing.html#setup and they
I have never saved and retrieved an image to and from the database before.
I would like to know where i can find my callback url in ci?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.