PHPoAuthLib icon indicating copy to clipboard operation
PHPoAuthLib copied to clipboard

Facebook service must parse JSON for now

Open velosipedist opened this issue 11 years ago • 9 comments

Facebook OAuth can return token as JSON. First it was issued 3 days ago.

velosipedist avatar Dec 30 '13 08:12 velosipedist

Have you got more documentation on this? Can't seem to find how to request an access token that returns json.

hannesvdvreken avatar Jan 19 '14 14:01 hannesvdvreken

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.

velosipedist avatar Jan 22 '14 09:01 velosipedist

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.

velosipedist avatar Feb 13 '14 09:02 velosipedist

Will investigate...

PeeHaa avatar Mar 18 '14 00:03 PeeHaa

Status on this? It still occurs and gives a json response when using parse_str

hirvolainen avatar Jul 10 '14 10:07 hirvolainen

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?

elliotchance avatar Sep 08 '15 22:09 elliotchance

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

melloc01 avatar Nov 23 '16 13:11 melloc01

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.

flavioheleno avatar Nov 23 '16 13:11 flavioheleno

@Lusitanian & @elliotchance any chance you guys are around to take a look at this..?

flavioheleno avatar Dec 19 '16 00:12 flavioheleno