简体   繁体   中英

calculating total number of retweets in C#

I am creating a web app in C#, and I want to calculate the total number of retweets to a user.

I found a lot of code snippets for calculating retweets for a specfic tweet , but I want to calculate the total number of retweets to a user (without using OAuth). Has anyone done this type of work before?

Thanks in meekness.

Do you mean how many retweets the user has seen?

There is a specific API call for that - see the documentation for statuses/retweeted_to_user

Here are the last 100 retweets that people have sent me

https://api.twitter.com/1/statuses/retweeted_to_user.xml?screen_name=edent&count=100

This method does not require OAuth

EDIT Based on your answer...

You want to count how many time a user has retweeted.

You need to call the user's timeline and ensure you have include_rts=true

So, for example, to get the last 200 tweets I have sent

https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=edent&count=200

Then, count the number of "retweeted_status".

Again, this doesn't require OAuth.

有一个特定的API调用 - 请参阅status / retweeted_to_user的文档,您也可以在那里看到文档,有许多免费的库可用于此目的

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM