php - facebook extended access token login -


i have following code:

 $facebook = new facebook(array(                 'appid'  => id,                 'secret' => secret,                 'cookie' => true));      $fb_uid = $facebook->getuser();      if($fb_uid)    {    // check if person fb_uid facebook id in database,     // if log them in. if not, register them.       $fb_user = $facebook->api('/' . $fb_uid);        email address using $fb_user['email'] , facebook_id , store in database means log them in future 

sometimes $fb_uid returns false though person logged in using facebook ... think because access token expires. how can change code incorporate extended access token log in user site?

offline access token deprecated, need use extended access token.

your cookie expiring. instead of using cookie , screen-scraping, use oauth.

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


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -