www.webdeveloper.com
Results 1 to 5 of 5

Thread: FB - How i can get access token ?

  1. #1
    Join Date
    Dec 2009
    Posts
    86

    FB - How i can get access token ?

    Hello friends i'm trying this method for get fb access token, but this is not working....

    Return empty value

    PHP Code:
        define('FACEBOOK_APP_ID''xxxxxxxxxxxxxxxxxxxxxxxx');
        
    define('FACEBOOK_SECRET''xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');

        function 
    get_facebook_cookie($app_id$app_secret) {
            
    $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 $app_secret) != $args['sig']) {
                    return 
    null;
                }
                return 
    $args;
        }

        
    $cookie get_facebook_cookie(FACEBOOK_APP_IDFACEBOOK_SECRET);
            
        echo 
    $cookie['access_token']; 

  2. #2
    Join Date
    Dec 2009
    Posts
    86

    ????

  3. #3
    Join Date
    Dec 2009
    Posts
    86
    ..

  4. #4
    Join Date
    Sep 2012
    Posts
    8
    Why do you wanna get the acces token?

  5. #5
    Join Date
    Jan 2009
    Posts
    3,346
    It doesn't look like the _COOKIE method is the method prescribed by FB any longer:
    https://developers.facebook.com/docs...-architecture/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles