How can I execute a FQL query with Facebook Graph API

后端 未结 5 902
南旧
南旧 2021-01-29 23:26

I\'m looking without any success for a way to execute a FQL(facebook query language) query with the new Open Graph API.

Does anyone know how I can do this?

Found

5条回答
  •  旧巷少年郎
    2021-01-30 00:30

    Here's an example of how to do a FQL query using the Graph API and JavaScript

    FB.api(
            {
                method: 'fql.query',
                query: 'SELECT uid, first_name, last_name FROM user WHERE uid = ' + someUid
            },
            function(data) {
                //    do something with the response
            }
    );
    

    This assumes you've already setup your page according to the Facebook guidelines as shown here - http://developers.facebook.com/docs/reference/javascript/

提交回复
热议问题