Twitter REST API有一种显示用户关系数据的方法。请参阅https://dev.twitter.com/rest/reference/get/friendships/show上的文档。它说:
返回有关两个 任意用户之间关系的详细信息。
该响应包含在source
和target
用户following
和followed_by
字段。这是结果示例:
{
"relationship": {
"target": {
"id_str": "12148",
"id": 12148,
"screen_name": "ernie",
"following": false,
"followed_by": false
},
"source": {
"can_dm": false,
"blocking": null,
"muting": null,
"id_str": "8649302",
"all_replies": null,
"want_retweets": null,
"id": 8649302,
"marked_spam": null,
"screen_name": "bert",
"following": false,
"followed_by": false,
"notifications_enabled": null
}
}
}
我不知道在使用流API时这是否可以帮助您。但至少,您不必“请求我的追随者名单,并与每个新鸣叫相比较”,就像您上面所说的那样。
这很有用,谢谢,我可能会这样做,但希望有一种方法可以让初始tweet上的数据避免额外的请求 - 我正在观察这些费率限制... – tripRev 2014-11-23 09:14:57