[英]Using Tweepy to fetch recent Tweets from a specific location
我正在嘗試從指定位置獲取最近的推文,該位置可以是城市/國家/地區。 我瀏覽了 Tweepy 文檔並遵循了所提到的片段,但看起來我在這里遺漏了一些東西。
# the coordinates and params
lat = 28
long = 77
granularity = 'city'
max_results = 1
# fetching the locations
locations = tweepy.api.reverse_geocode(lat=lat, long=long, granularity=granularity, max_results=max_results)
如果有人可以指出我在這里缺少什么,那將會很有幫助。
tweepy.api
是tweepy.API
的未經身份驗證的實例。
您需要使用您的身份驗證/憑證實例化您自己的API
實例。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.