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 8144771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:28:16+00:00 2026-06-06T13:28:16+00:00

I have the following code: $facebook = new Facebook(array( ‘appId’ => ID, ‘secret’ =>

  • 0

I have the following code:

 $facebook = new Facebook(array(
                'appId'  => ID,
                'secret' => SECRET,
                'cookie' => true));


   $fb_uid = $facebook->getUser();


   if($fb_uid)
   {
   // check if person with fb_uid as facebook id in database, 
   // if so log them in. If not, register them.


    $fb_user = $facebook->api('/' . $fb_uid);


     I then get their email address using $fb_user['email'] and facebook_id and store in the database as a means to log them in the future

Sometimes $fb_uid returns false even though the person is logged in using facebook … I think it is because the access token expires. how can I change this code to incorporate the extended access token to log in the user to my site?

offline access token is deprecated, so I need to use the extended access token.

  • 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-06T13:28:17+00:00Added an answer on June 6, 2026 at 1:28 pm

    Your cookie is expiring. Instead of using a cookie and screen-scraping, use OAuth.

    See example here: http://eggie5.com/20-getting-started-w-facebook-api

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

Sidebar

Related Questions

I have the following code (with my facebook.php correctly added in, appId and appSecret
I have following code: <?php $select_options = array(); foreach($delivery_options as $option) { $select_options[$option->getDeviceId()] =
All, I have the following code: <?php require_once 'facebook.php'; $app_id = 1234; $app_secret =
I have the following code, which logs in and out of Facebook fine, but
I have the following code to allow users to invite thier Facebook friends: function
I have upload the video on facebook using following code Help From : https://github.com/zoul/facebook-ios-sdk/
I have written a wrapper around the C# Facebook SDK usign the following code:
I have following code.. $query = SELECT quote, author FROM quotes ORDER BY id
I have following code and it returns false for @B LIKE @A comparison in
I have following code $("#in").datepicker({ minDate: 0, onSelect: function (dateText, inst) { dateText =

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.