我如何......阅读Twitter api的推文.. [英] How do i...read tweets from Twitter api..
本文介绍了我如何......阅读Twitter api的推文..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
i希望得到所有推文,用户发送到sharjah_radio,
但我得到的是sharjah_radio推文
iam使用
Public q As String =sharjah_radio
Public url As String = https://api.twitter.com/1.1/statuses/home_timeline.json< br $> b $ b
请帮我这个
我有什么试过:
Hi
i want to get all tweets, users send to sharjah_radio,
but i am gettting the sharjah_radio tweets
iam using
Public q As String = "sharjah_radio"
Public url As String = https://api.twitter.com/1.1/statuses/home_timeline.json"
pls help me in this
What I have tried:
Dim headerFormat As Object = "OAuth oauth_nonce=""{0}"", oauth_signature_method=""{1}"", " + "oauth_timestamp=""{2}"", oauth_consumer_key=""{3}"", " + "oauth_token=""{4}"", oauth_signature=""{5}"", " + "oauth_version=""{6}"""
Dim authHeader As Object = String.Format(headerFormat, Uri.EscapeDataString(oauth_nonce), Uri.EscapeDataString(oauth_signature_method), Uri.EscapeDataString(oauth_timestamp), Uri.EscapeDataString(oauth_consumer_key), Uri.EscapeDataString(oauth_token), _
Uri.EscapeDataString(oauth_signature), Uri.EscapeDataString(oauth_version))
ServicePointManager.Expect100Continue = False
' make the request
Dim postBody As Object = "screen_name=" + Uri.EscapeDataString(screen_name) + "&count=" + Uri.EscapeDataString(Count)
'
resource_url += "?" + postBody
Dim request As HttpWebRequest = CType(WebRequest.Create(resource_url), HttpWebRequest)
request.Headers.Add("Authorization", authHeader)
request.Method = "GET"
request.ContentType = "application/x-www-form-urlencoded"
Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
Dim reader As New StreamReader(response.GetResponseStream())
Dim objText As Object = reader.ReadToEnd()
myDiv.InnerHtml = objText
'
推荐答案
你应该花一些时间来审查一下twitter API,看看你想做什么是可能的,而不是猜测。简短/快速概述显示您可以按用户收到推文,但我没有看到任何明显的向我显示所有针对用户的推文。
REST API | Twitter开发者 [ ^ ]
You should spend some time reviewing the twitter API to see if what you are wanting to do is possible rather than guessing. A brief/quick overview shows you can get tweets by user but I don't see anything obvious that says "show me all tweets directed at a user".
REST APIs | Twitter Developers[^]
这篇关于我如何......阅读Twitter api的推文..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文