arsduo/koala — Issue #163: Support FB Access Token Exchange
Author: shuw
Created: 2012-01-19 21:32:55+00:00
State: open

FB just released a new API to refresh access tokens: https://developers.facebook.com/docs/offline-access-deprecation/

Unfortunately, their response in that API is not JSON. So,

graph = Koala::Facebook::GraphAPI.new
graph.get_object 'oauth/access_token',
{grant_type:'fb_exchange_token', client_id: '336641228566', client_secret: '...', fb_exchange_token: '...'},
use_ssl: true

will raise an exception trying to parse the response:

access_token=...

FB should ideally return a JSON response. But if they won't fix this, we need to support parsing of querystring formatted responses.