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

  • Home
  • SEARCH
  • 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 401903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:04:34+00:00 2026-05-12T17:04:34+00:00

I’ve been working on this for a while now and I can’t seem to

  • 0

I’ve been working on this for a while now and I can’t seem to get it to work. It seems to be a frequently asked, but a rarely well-answered question.

I want my website’s users to link their facebook account with my website.
So they can see their stream e.t.c on my site.

At the moment, each time they log into my site they have to connect with facebook again.
I want to have the option for users to give me offline_access to their data, so they don’t have to re-login to facebook/re-connect with my site each time they come to my site. As its kind of the point of my site in general.

To do this I understand I need to get offline access. (https://developers.facebook.com/docs/authentication/) Though from my searching it seems to be a bit light on documentation ( Facebook offline access step-by-step ).

I already know how to ask for offline access I’m just unsure of how to get the data from it.

So my questions are as follows;

  1. How do I get the new infinate Session key after I request it?
  2. Once I have it and store it in the database – How do I create a facebook user with it instead of just going through the normal limited access key?

Just for further info. I’m using PHP (codeigniter) with Eliot Haughin’s Facebook connect library Though if you can give me code using the regular php library I’ll just convert it

Thanks very much

  • 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-05-12T17:04:35+00:00Added an answer on May 12, 2026 at 5:04 pm

    Right. After some more searching and poking around the code. I figured it out.

    I’ve tested it out for multiple users and over the course of a week and it works like a charm.

    When you have gotten the offline_access permission, store the session key, and the user ID. (wherever you want. I store mine in my database).

    The infinite session key will look something like this df4175330aaddb9d50fd8f84-30000799
    with everything after the ‘dash’ being the users ID.

    Then the next time you call the API add this line of code in.

    $this->fb->set_user(‘Facebook User ID’, ‘Offline Access Session key’, 0);
    N.B. the zero is the amount of time before it will expire. 0 = never.

    My code in my library is as follows

    $this->fb = new Facebook($this->_api_key, $this->_secret_key);     
    //Query Database to see if user had enabled offline access.
    //If So extract the userid and session key
    $this->fb->set_user($fbuserid, $fbsess, 0);
    

    In my testing this has worked perfectly.
    Now my users can log into my site and have facebook automatically, once they give the offline_access permission. Its currently been working for a week without problems.

    I think thats everything. But if I left anything out let me know.

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

Sidebar

Ask A Question

Stats

  • Questions 303k
  • Answers 303k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Metadata is a collection of table definitions. Engine is the… May 13, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer Set views as content. In order to do that -… May 13, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer For the first part of question, you might use #… May 13, 2026 at 8:34 pm

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.