根据twitter文档,max_id返回最低的tweet ID。
但是我得到的推文ID最高,即最近的推文ID作为search_metadata中的max_id字段。
search_metadata: {completed_in: 0.072, max_id: 1045881831214776300, max_id_str: "1045881831214776320", next_results: "?max_id=1045881207567929348&q=nepal&count=20&include_entities=1", query: "nepal", …}statuses:
Array(20)
0: {created_at: "Sat Sep 29 03:43:54 +0000 2018", id: 1045881831214776300, id_str: "1045881831214776320"}
1: {created_at: "Sat Sep 29 03:43:35 +0000 2018", id: 1045881752294580200, id_str: "1045881752294580224"}
2: {created_at: "Sat Sep 29 03:43:21 +0000 2018", id: 1045881692983095300, id_str: "1045881692983095297"}
3: {created_at: "Sat Sep 29 03:42:59 +0000 2018", id: 1045881598988693500, id_str: "1045881598988693504"}
.
.
19: {created_at: "Sat Sep 29 03:41:26 +0000 2018", id: 1045881207567929300, id_str: "1045881207567929349"}length: 20
像在此响应正文中一样,我将最近的tweet id用作max_id,并使用此max_id返回相同的tweet记录。