Android 和 Facebook:如何在 Android 应用程序中使用 Facebook 查询语言 (FQL)
在此页面上,Facebook 告诉您,您可以以某种方式使用 Facebook 查询语言: http: //developers.facebook.com/docs/reference/fql/profile
但我只是不明白查询是什么样的。在 Stackoverflow 上,我只是找到有关如何将 FQL 与 PHP 结合使用的示例。但我想在 Android 应用程序之外使用它。谁能给我网址或代码示例?
On this page facebook tells you, that you can somehow use the Facebook-Query-Language: http://developers.facebook.com/docs/reference/fql/profile
But I just dont understand what the query looks like. On Stackoverflow I just find exapmles on how to use the FQL with PHP. But I want to use it out of and Android Application. Anybody can give me URLs or Code Examples?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 Facebook Android SDK,可以像这样实现 FQL 调用:
其中 FQLRequestListener 扩展了 RequestListener ,就像 Graph 调用一样。
Using the Facebook Android SDK, an FQL call can be implemented like this:
where FQLRequestListener extends RequestListener, just as for a Graph call.
请参阅此链接 https://developers.facebook.com/docs/reference/fql ,您可以更深入,因为您可以单击每个元素并查看每个元素的所有属性(例如此处的“相册”:https://developers.facebook.com/docs/reference/fql/album/ )。
这是一个通过“album_id”获取相册图片的 url 的查询示例:
这是调用您的请求的方法之一:
我希望我有所帮助,祝你好运! :)
See this link https://developers.facebook.com/docs/reference/fql , and you can go deeper because you can click on each element and see all the propreties of each element , ( exemple "album" here : https://developers.facebook.com/docs/reference/fql/album/ ).
This is an exemple of query to get the url of the pictures of an album by "album_id" :
This is one of the ways to call your request :
I hope I helped, good luck! :)
如果我将其放入浏览器中,这似乎可以工作,但我不知道如何告诉 Android Facebook SDK 使用此查询:
https://api.facebook.com/method/fql.query?query=select+pic_small+from+profile+where+id+%3D+USERID;&access_token=ACCESSTOKEN
This seems to work if I put it into the Browser, but I dont know how to tell the Android Facebook SDK to use this query:
https://api.facebook.com/method/fql.query?query=select+pic_small+from+profile+where+id+%3D+USERID;&access_token=ACCESSTOKEN
我还没有尝试过,但是对于调用 fql 你可以尝试
它应该可以工作。
您必须考虑到 mFacebook 是经过身份验证的 Facebook 对象(属于 Facebook Android SDK)。另外,fql 应该使用 url 支持的格式填充。例如:
代替
I haven't tried it, but for calling fql you can try
It should work.
You have to take into acount that mFacebook is an authenticated Facebook Object (of the Facebook Android SDK). Also, that the fql sould be filled with a format supported by an url. For example:
instead of