Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

How to run FQL , using javascript?

14 like 0 dislike
Hello friends,

                  How to run FQL query using java script?Can any one tell me about tell me about trhis......
asked 1 year ago by biswaskeran (70,430 points)

1 Answer

1 like 0 dislike
Hi,

     Facebook Query Language  enables you to use a SQL-style interface to query the data exposed by the Graph API. It provides for some advanced features not available in the Graph API, including batching multiple queries into a single call. Checkout the tables to know which data of facebook user you can retrieve. In the demo’s source code you’ll see
view source
print?
    function fqlQuery(){
                    FB.api('/me', function(response) {
                         var query = FB.Data.query('select name, hometown_location, sex, pic_square from user where uid={0}', response.id);
                         query.wait(function(rows) {
     
                           document.getElementById('name').innerHTML =
                             'Your name: ' + rows[0].name + "<br />" +
                             '<img src="' + rows[0].pic_square + '" alt="" />' + "<br />";
                         });
                    });
                }

This method used the sdk method FB.Data.query to run FQL. Checkout the link for a complex query example.
answered 1 year ago by allian (14,180 points)

Related questions

3 like 0 dislike
1 answer
4 like 0 dislike
1 answer
4 like 0 dislike
1 answer
6 like 0 dislike
1 answer
asked 1 year ago by SeO (39,810 points)