![](/img/trans.png)
[英]I can't get number of followers of the followers of a specific user using Twitter API V2
[英]How to get retrieve twitter user id from twitter handle using the twitter v2 API
我目前使用的是twitter v2 API,使用下面的npm ZEFE90A8E604A7C840E88D03A6D
const tweets = await client.v2.userTimeline(userId, { exclude: 'replies' });
對於此命令,我需要用戶 ID 而不是 twitter 句柄。
如何使用 twitter ZDB974238714CA8DE4D3AZ 句柄從 twitter 句柄中獲取 twitter 用戶 ID?
您將使用client.v2.userByUsername('handle');
並從響應中獲取 ID 值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.