通过uid查询event_member表
当我运行这个简单的查询时:
SELECT eid FROM event_member WHERE uid = MY_FRIEND_UID
在测试 查询控制台 中,我总是返回空结果集。但是,如果我将 MY_FRIEND_ID
替换为 me()
,我会返回我的事件列表。
我的应用程序设置为允许 user_events
和 friends_events
,所以这是我的问题:
考虑到 uid 是我的朋友之一,是否可以通过 uid 查询 event_member? 如果是,为什么这个查询不起作用?
When I run this simple query:
SELECT eid FROM event_member WHERE uid = MY_FRIEND_UID
in the test query console, I always get back an empty result set.However, if I replace MY_FRIEND_ID
with me()
, I get back my list of events.
My app is set to allow user_events
and friends_events
, so here is my question:
Is it possible to query the event_member by uid, given the uid is one of my friends?
if yes, why this query is not working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

我有类似的问题。我发现我使用的访问令牌没有新的权限(完全相同的 user_events 和friends_events),因为它是在将这些权限添加到应用程序之前获得的。
您可以尝试使用 Facebook Graph API Explorer 调试当前使用的令牌的权限并轻松生成新令牌并用它运行 HQL。就我而言,立即发现问题出在令牌许可上,并且使用新令牌一切都像魅力一样。
I had similar problem. I turned out that the access token that I was using did not had the new permissions (exactly the same user_events and friends_events) because it was obtained before adding those permission to the app.
You can try to use use Facebook Graph API Explorer to Debug the permission of your currently used token and to easily generate a new token and run the HQL with it. In my case it turned out immediately that the problem was in the token permission and with new token everything worked like a charm.