I have seen examples of fetching data using FQL with the help of PHP Facebook SDK , but is it possible to fire FQL query using Javascript or Jquery as i want to fetch online friend list in jquery mobile.
Asked
Active
Viewed 1,075 times
2 Answers
4
You can do it with FB.api
method of JavaScript SDK
FB.api('/fql', 'GET', {q:'YOUR_FQL_QUERY'}, function(response){
if (response && response.data)
console.log(response.data);
});

Juicy Scripter
- 25,778
- 6
- 72
- 93
2
Facebook has an extensive JavaScript SDK, which will offer you what you need.
Once you have authenticated the client, you should use the FB.api()
method to launch an API request. In particular, you should be considering the online_presence
of your users' friends (in the user
table).
For more info, see the StackOverflow question; How to get list of online friends using FQL with facebook API?