When querying the Graph API with a ‘known’ browser the JSON output is formatted in a way to make it easy for humans to read. If the query is done with any other browser then it outputs everything on one line.
How do you explicitly make the request so that the formatting is not done? I’m sure I’ve seen it somewhere, but I can’t seem to find it now.
The
prettyparameter controls it. Sohttps://graph.facebook.com/foo?pretty=0always prints without extra whitespace, whilehttps://graph.facebook.com/foo?pretty=1always prints with extra whitespace, and omitting it causes the default behavior of switching based on user-agent.