PHPoAuthLib
PHPoAuthLib copied to clipboard
Facebook service must parse JSON for now
Facebook OAuth can return token as JSON. First it was issued 3 days ago.
Have you got more documentation on this? Can't seem to find how to request an access token that returns json.
Problem raised at my company's internal project during functionality testing. json_decode() fixed it and i left fallback logic for query string case.
Is is very strange, but now Facebook behaves as it was documented again, using query string response format.
If it will happen again, i will report here, with all possible logged data.
It happens again, right now, right in my app, parse_str fails, and json_decode works o_O
Cannot give app url, it is internal company project, but believe me, it is true :scream: I wouldn't write PR just for fun or waste my and your time for nothing.
Will investigate...
Status on this? It still occurs and gives a json response when using parse_str
Is it possible this is anything in your internal network interfering with this (like a proxy)? Have you found a way to replicate the issue?
Can we merge this one?
Since API version 2.3 Facebook response format is JSON.
Either we test if api version > 2.2 or we accept this solution which also solves it.
@Lusitanian @elliotchance @flavioheleno
From Facebook's changelog:
Changes from v2.2 to v2.3 [Oauth Access Token] Format - The response format of https://www.facebook.com/v2.3/oauth/access_token returned when you exchange a code for an access_token now return valid JSON instead of being URL encoded. The new format of this response is {"access_token": {TOKEN}, "token_type":{TYPE}, "expires_in":{TIME}}. We made this update to be compliant with section 5.1 of RFC 6749.
@Lusitanian & @elliotchance any chance you guys are around to take a look at this..?