Retrieve list of sent friend requests from friend_

2019-07-20 08:49发布

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条回答
女痞
2楼-- · 2019-07-20 09:16

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.

查看更多
登录 后发表回答