查询流表中用户自己的帖子会返回其他人的照片标签
我正在查询流表以检索登录用户最近发布的所有内容。我使用以下查询:
SELECT source_id、actor_id、app_id、post_id、created_time、message、likes、attachment 来自流 其中源 ID = XXXXX AND actor_id = XXXXX
问题是,响应包含其他用户在照片中标记登录用户时的条目,我不认为这是登录用户自己的帖子。
我查看了流表中的其他字段,例如 taget_id 和viewer_id,但找不到限制结果的方法。
任何人都可以帮助我排除这些标签帖子或在返回的数据中识别哪些条目被标记为照片(或其他可以标记的内容)?
先感谢您。
// 彼得
I am querying the stream table to retrieve everything that the logged in user has posted recently. I am using the following query:
SELECT source_id, actor_id, app_id, post_id, created_time, message, likes, attachment
FROM stream
WHERE source_id = XXXXX
AND actor_id = XXXXX
The problem is that the response includes entries for when other users have tagged the logged in user in photos, which I don't consider to be a post from the logged in user him/herself.
I have looked at other fields in the stream table such as taget_id and viewer_id but cannot find a way to limit the results.
Can anyone help me to excludes these tag posts or identify in the returned data which entries are tagged photos (or other things that can be tagged)?
Thank you in advance.
// Peter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过循环遍历条目来完成您想要执行的操作,如果附件是照片或视频,请检查所有者 ID 是否与用户 ID 相同。如果是不同的用户 ID,那么您就知道他们没有发布该内容,只是在照片中添加了标签。
You can accomplish what you're trying to do by looping over the entries, and if the attachment is a photo or video, checking to see if the owner id is the same as the user id. If it's a different user id, then you know they didn't post it and they were just tagged in the photo.