Giffary
Giffary

Reputation: 3128

how to use https://api.facebook.com/method/fql.query?query=

Hi i need to use https://api.facebook.com/method/fql.query?query= to get user profile picture and other user information on PHP.

i know that https://api.facebook.com/method/fql.query?query= return some json or XML.

but i don't know how to get json to use.

thank you

Upvotes: 0

Views: 7626

Answers (3)

Jeff Bowen
Jeff Bowen

Reputation: 6162

The REST API has been deprecated. To make FQL queries you should use the Graph API. To do so, just issue an HTTP GET request to https://graph.facebook.com/fql?q= and provide your FQL statement as the value of the q parameter. For more info, check out the FQL documentation. You can use the Graph API Explorer to easily test FQL queries.

Upvotes: 2

Salman Riaz
Salman Riaz

Reputation: 83

You can add a parameter format=json to get result in json format. So the url will be

https://api.facebook.com/method/fql.query?query=fql&format=json&access_token=t

By default format is xml.

Upvotes: 2

serg
serg

Reputation: 111325

PHP has built in json support. See json_decode manual.

And if you are wondering how to run FQL from PHP - it was just asked.

Upvotes: 2

Related Questions