如何使用Facebook Graph API执行FQL查询 [英] How can I execute a FQL query with Facebook Graph API

查看:102
本文介绍了如何使用Facebook Graph API执行FQL查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有任何成功的方式使用新的Open Graph API执行FQL(facebook查询语言)查询。

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?

在这里找到了一个很好的例子:
http://code.google.com/p/facebook-cpp-graph-api/

Found the answer here with this excellent example: http://code.google.com/p/facebook-cpp-graph-api/

推荐答案

以下是使用Graph API和JavaScript执行FQL查询的示例

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
        }
);

这假设您已经根据Facebook指南设置了您的页面,如下所示 - http://developers.facebook.com/docs/reference/javascript/

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

这篇关于如何使用Facebook Graph API执行FQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆