简体   繁体   English

计算C#中转发的总数

[英]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. 我正在用C#创建一个Web应用程序,我想计算用户转发的总数。

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). 我发现了许多用于计算特定推文的转推的代码片段,但我想计算转发给用户的总数(不使用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 有一个特定的API调用 - 请参阅status / retweeted_to_user文档

Here are the last 100 retweets that people have sent me 以下是人们寄给我的最后100次转推

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

This method does not require OAuth 这种方法不需要的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 您需要调用用户的时间轴并确保include_rts = true

So, for example, to get the last 200 tweets I have sent 因此,例如,获取我发送的最后200条推文

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. 同样,这不需要OAuth。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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