FQL返回空集? [英] FQL returning empty set?

查看:126
本文介绍了FQL返回空集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Facebook API和FQL中弄湿我的脚。我的查询返回一个空集,我不知道有什么权限要更改。我在几年前开始使用一个旧应用程序,当API首次出现时。



我试图使用该应用程序和 fql.query测试控制台



对于初学者,我是试图得到我的墙上的帖子:

  SELECT actor_id,message FROM stream WHERE source_id = xxxxx limit 50 

返回是:

  [] 

所以我尝试使用 source_id = yyyyy ,一个朋友的身份证,我收到他的职位。



问题:


  1. 我如何使用FQL来告诉我的应用程序是否有访问此数据的权限?

  2. 为什么我无法为自己的应用程序检索这个,我是管理员?

  3. 我可以更改哪些权限(对于我的应用程序,我的个人资料?)可以查询我的墙上的帖子?什么URL让我更新这些权限?


解决方案


我如何使用FQL来判断或
不是我的应用程序有权访问
这个数据吗?


你不能,大多数时候应该通过一个错误通知你失踪的权限。 但是,您可以检查您的应用程序是否已经获得了一定权限:

  SELECT read_stream,offline_access,publish_stream FROM permissions WHERE uid = me()

更多关于这个这里


为什么我无法检索这个为我自己的
应用程序,我是
管理员?


如果您没有正确的权限,您将无法获取所需的信息,即使您是应用程序的管理员。


我需要更改哪些权限
(对于我的应用程序?为我的个人资料?)为
能查询我的墙贴?什么URL
可以让我更新这些权限?


stream 表格文档。您需要 read_stream 权限






现在为什么你能够查看你朋友的帖子,而不是你的文章也在文档中提到:



当您查询此表时,您可以获得两种类型的数据:




  • 您可以公开

  • 如果您提示用户获得read_stream扩展权限,您可以获取更多数据。



所以很可能你的隐私设置设置为高或某事。只需获得 read_stream 权限,您就可以检索到您的帖子。


I am trying to get my feet wet in the Facebook API and FQL. My query is returning an empty set, and I'm not sure what permissions to change. I had started an old app years ago when the API first came out.

I am trying to use that app and the fql.query test console

For starters, I am trying to get my wall posts:

SELECT actor_id, message FROM stream WHERE source_id = xxxxx limit 50

And the return is:

[]

So then I tried the same query with source_id = yyyyy, a friend's ID, and I got his posts. This is hit-or-miss with different friends.

Questions:

  1. How can I, using FQL, tell whether or not my app has permissions to access this data?
  2. Why can't I retrieve this for my own application, for which I am the administrator?
  3. What permissions do I need to change (for my app? for my profile?) to be able to query my wall posts? What URL lets me update those permissions?

解决方案

How can I, using FQL, tell whether or not my app has permissions to access this data?

You can't, most of the time it should through an error informing you of the missing permission. BUT you can check if your application has granted a certain permission:

SELECT read_stream,offline_access,publish_stream FROM permissions WHERE uid=me()

More about this here.

Why can't I retrieve this for my own application, for which I am the administrator?

If you don't have the right permission you won't get the information you need even if you are the administrator of the app.

What permissions do I need to change (for my app? for my profile?) to be able to query my wall posts? What URL lets me update those permissions?

It's cleary stated in the stream table document. You need the read_stream permission.


Now why you were able to view your friend's posts and not yours is also mentioned in the document:

You can get two types of data when you query this table:

  • You can get public data (viewable to anyone on Facebook) without needing an extended permission.
  • You can get more data if you prompt the user for the read_stream extended permission.

So most likely you have your privacy settings set to high or something. Just get the read_stream permission and you'll be able to retrieve your posts.

这篇关于FQL返回空集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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