Retrieve list of sent friend requests from friend_request FQL table

谁说胖子不能爱 提交于 2019-12-11 02:29:50

问题


I need to display a list of friend request that I have sent to. I tried using FQL:

SELECT time, message FROM friend_request WHERE uid_from = me()

However, this alway returns an error message:

The uid_from field is not indexed

Is there any way to achieve this?


回答1:


This is not possible - the Documentation for the friend_request FQL table clearly shows that the only indexable field in the table is uid_to

You can read a list of friend requests sent to the current user, or check the status of any friend request sent by the current user provided that you know which user it was sent to.

i.e

SELECT time, message FROM friend_request WHERE uid_to = me()

or

SELECT time, message FROM friend_request WHERE uid_from = me() and uid_to = [USER ID HERE]

You cannot retrieve all friend requests sent by the current user.



来源:https://stackoverflow.com/questions/14144284/retrieve-list-of-sent-friend-requests-from-friend-request-fql-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!