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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:09:06+00:00 2026-05-25T16:09:06+00:00

The way I have set it up is that when the user first visits

  • 0

The way I have set it up is that when the user first visits the site, it will ask them to login with Facebook. It gets an access token and creates a session on my site.

If at any point the user logs out of facebook, say in another tab, the session will still exists within in my application.

The only way I can see to detect if the user is still logged into Facebook is re-requesting an access token as there doesnt seem to be a way to check if an existing access token is still valid.

I did try simply doing:

file_get_contents('https://graph.facebook.com/me?access_token=xxx')

but, since the token is no longer valid (as the user has logged out), file_get_contents returns an error, although, viewing this in the browser shows the oauth exception but im assuming file_get_contents is erroring because of the HTTP response code

  • 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-25T16:09:06+00:00Added an answer on May 25, 2026 at 4:09 pm

    You could do something like this I think:

    @$data=file_get_contents('https://graph.facebook.com/me?access_token=xxx');
    foreach ($http_response_header as $rh) if (substr($rh, 0, 4)=='HTTP') list(,$status,)=explode(' ', $rh, 3);
    if ($status==200 && $data)
        //Token is good, parse data
    else
        //Token is no good
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way that you can have SERVEROUTPUT set to ON in sqlplus
I have a user model that has properties such as username, password, first name,
I have a registration form that a user can access via invitation. For example,
I have an entity class User that contains information such as username, first name,
I have a List of Tasks that a user can preform. Each one will
I have set the form decorators in this way: <?php $this->setElementDecorators(array( 'Label', array(array('labelTd' =>
Is there an easy way to have the form helpers set the tabindex parameter
Lets say I have model inheritance set up in the way defined below. class
Is there any way to have something that looks just like a file on
Is there a way to have a mutable static variable in F# class that

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.