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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:42:06+00:00 2026-05-27T18:42:06+00:00

I have implemented a Facebook connect example with my Codeigniter website. I am trying

  • 0

I have implemented a Facebook connect example with my Codeigniter website. I am trying to bring the Facebook connect code up to date but I cannot work out how to parse the fbsr_cookie which has replaced the fbs_cookie.

I have the following code –

function get_facebook_cookie() 
    {
        // get the fb app id, and secret from CI config source
        $CI =& get_instance();
        $app_id = $CI->config->item('facebook_app_id');
        $application_secret = $CI->config->item('facebook_app_secret');
        if(isset($_COOKIE['fbs_' . $app_id])){
            $args = array();
            parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args);
            ksort($args);
            $payload = '';
            foreach ($args as $key => $value) {
                    if ($key != 'sig') {
                    $payload .= $key . '=' . $value;
                    }
            }
            if (md5($payload . $application_secret) != $args['sig']) {
                    return null;
            }
            return $args;
        }
        else{
            return null;
        }
    }

and then to get the user’s Facebook id –

function getUser()
    {
        $cookie = $this->get_facebook_cookie();
        $user = @json_decode(file_get_contents( 'https://graph.facebook.com/me?access_token=' . $cookie['access_token']), true);
        return $user;
    }

Does anyone have an idea how I can change this to work with the fbsr_cookie?

Thanks.

  • 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-27T18:42:07+00:00Added an answer on May 27, 2026 at 6:42 pm

    The new cookie format with name fbsr_APPID is actually a signed_request which is quite easy to parse and documentation showing exactly how to do this (see “Verifying and Decoding” in signed_request Documentation

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

Sidebar

Related Questions

I have implemented the facebook connect with android. It was working fine before but
I have implemented Facebook Connect into a HTML page exactly as the tutorial explains
I have implemented Facebook Connect in my iPhone project and it is working great.
I am trying to implement Facebook Connect functionality into a website that I am
The Facebook connect code is eluding me a bit. I have no problem doing
I have implemented Facebook authentication on my website. I have asked for user permissions
I have implemented Facebook Connect with ASP.Net 3.5. My problem is when i click
I have implemented Facebook connect on my iPhone App to login users to my
I have just implemented Facebook Authentication on my website using Facebook JavaScript. If user
I need to implement facebook-connect to a website where users already might have their

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.