I am trying to retrieve details of a page/profile from Facebook into my PHP application. So I retrieve the id first and then run the following query. However I am getting an error.
I am getting the following error:
Warning: file_get_contents(https://graph.facebook.com/v2.8/40444963499?fields=id,name,picture.width(700).height(700),albums.limit(5){name,photos.limit(2){name, picture}},posts.limit(5)&access_token="my access token here"): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
However, if I run the same URL on the browser, I get back the JSON correctly.