簡體   English   中英

Twitter API - 獲取帳戶的轉推計數

[英]Twitter API - Getting the retweet count of an account

我希望拉出特定用戶收到的轉發總數。 那可能嗎?

現在,我可以提取總推文數,關注者數量和朋友數量。

我正在使用的代碼是:

$username = "username";
$url = "https://api.twitter.com/1.1/users/show.json";
$requestMethod = "GET";
$getfield = "?screen_name=".$username."&include_entities=true";
$twitter = new TwitterAPIExchange($settings);
$string = json_decode($twitter->setGetfield($getfield)
    ->buildOauth($url, $requestMethod)
    ->performRequest(),$assoc = TRUE);

轉推的總數不是與用戶關聯的屬性。 每個Tweet都具有在retweet_count字段中收到的轉發數量。

您將需要獲取用戶的所有推文並添加轉推以獲得用戶收到的轉推。 你會發現的問題是,你可以獲得用戶推送的最新3200條推文的推文數量受到限制https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get- statuses-user_timeline.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM