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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:50:49+00:00 2026-05-27T15:50:49+00:00

I recently started to work with the Facebook API and I’m have some problems

  • 0

I recently started to work with the Facebook API and I’m have some problems with showing the $_COOKIE[“fbs_APP_ID”] cookie. Even when I log in with facebook and reload the same page the cookie is still showing null.

Here is my code. I took out my app id for security purposes but just assume that I have put it down in my real script.

By the way, I have in fact registered my application on facebook and such.

<html>

<head>
  <title>My Facebook Login Page</title>
</head>

<body>
  <div id="fb-root"></div>

  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : 'APP_ID',
        status     : true, 
        cookie     : true,
        xfbml      : true,
        oauth      : true,
      });

        FB.Event.subscribe('auth.login', function(response){
            window.location.reload();
            document.getElementById("messageContainer").innerHTML = "Reloaded successfully!";
        });

    };

    (function(d){
       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook.net/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));
  </script>

  <div class="fb-login-button">Login with Facebook</div>
  <div id = "messageContainer"> </div>
  <div id = "cookieCheck"> <?php echo var_dump($_COOKIE["fbs_APP_ID"]) ?></div>
</body>

  • 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-27T15:50:49+00:00Added an answer on May 27, 2026 at 3:50 pm

    on oauth2 you will get cookie by $_COOKIE[“fbsr_APP_ID”] not fbs..

    if you want to get access_token use response:

    FB.getLoginStatus(function(response) {
       if (response.status === 'connected') { 
        var access_token=response.authResponse.accessToken
       };
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An application I have recently started work on has to register two dll's, because
Recently in our work, I've started getting some experience with SEO (finally). It's something
I have recently started work on a large project in .net (C#) and I
I have recently started using automapper and it has work fine for me so
I have recently started applying for .Net jobs. I currently work in a sales
I have just recently started git-tfs bridge and seems to work fine for a
I have recently started work on an application that is already deployed to production.
I have recently started learning Silverlight and can't figure out how make this work.
I've recently started doing some JSF work - before that I've always used PHP
I have recently started working on some open source project which I found relevant

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.