我想收到我的信息流中的所有帖子,而不是来自网页的帖子。我试过了:
SELECT post_id, actor_id, target_id, message, comment_info, likes FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid = me() AND type = 'newsfeed') AND NOT (actor_id IN (SELECT id FROM object_url WHERE type='Page'))
但是,您不能在Where子句中使用type ='Page',因为它不可索引。
有什么想法吗?
答案 0 :(得分:1)
我看了一下,以下似乎对我有用:
SELECT post_id, actor_id, target_id, message, comment_info, likes FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid = me() AND type = 'newsfeed') AND NOT (actor_id IN (SELECT target_id FROM connection WHERE target_type='Page' AND source_id = me()))
这样做你想要的吗?