muenchnair muenchnair - 1 year ago 293
HTTP Question

Facebook graph api returns 400 bad request with correct access token

I just manually implemented a facebook oauth2 flow into my webapp. After receiving the correct access_token and trying to call the graph api for user data I got a 400 BAD REQUEST as response.


When I use exactly the same call within the dev tools provided on facebook it succeeds, but when I try using any other http client it doesnt work.
I already tried it with curl, apache commons and some other http clients.

Is there someone able to help me with this?

Thanks in advance

Answer Source

The format of your API call is incorrect. Try the following instead:


The accessToken in your URL should actually be access_token.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download