Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook not sending 60 day token
    text
    copied!<p>So I have been working on this for a few days now, searched endless questions and posts about this, but have yet to find a solution. I am trying to get a 60 day access token for my websites facebook app. I have remove offline_access permission enabled. Server-side I am using the fb_graph gem to accomplish this, however I have tried using HTTParty as well as pasting the url into the browser. My code is below. </p> <p>Now my code doesn't return errors, but the exchange always simply returns a token with a ~ one hour expiry. Now the strange thing is, locally I got it working one time for myself, and I have a 60 day token with my local app. However I cannot replicate this with any other user, nor on the live website. Another strange thing is any new user that signs up for my app, gets the 60 day token, but no matter how many times I try for existing users, I cannot get the 60 day token to appear on the live site. Could this be a bug on facebooks end? I have been working on it for a while now and I could really use some assistance!</p> <p>Here is my fb_graph code</p> <pre><code>fb_auth = FbGraph::Auth.new("my_api_key" , "my_api_secret") fb_auth.exchange_token! my_old_token fb_auth.access_token #Return long term (60 days) token *** LOCAL GEMS *** fb_graph (2.4.19) Author: nov matake Homepage: http://github.com/nov/fb_graph Installed at: /Users/amritk/.rvm/gems/ruby-1.8.7-p370 A full-stack Facebook Graph API wrapper in Ruby. </code></pre> <p>I have also used this method with HTTParty and pasting it in the browser</p> <pre><code>https://graph.facebook.com/oauth/access_token? client_id=APP_ID&amp; client_secret=APP_SECRET&amp; grant_type=fb_exchange_token&amp; fb_exchange_token=EXISTING_ACCESS_TOKEN </code></pre> <p>and yes I have read <a href="https://developers.facebook.com/roadmap/offline-access-removal/" rel="nofollow">https://developers.facebook.com/roadmap/offline-access-removal/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload