如何使用twitterizer获取热门推文?

时间:2017-10-04 12:50:30

标签: c# model-view-controller twitter

我希望使用Twitterizer显示当前的热门推文。我正在使用以下代码来尝试生成当前趋势。

 public TwitterResponse<TwitterTrendCollection> 
                GetTrendingTweets(string 
                accesstoken, string accesstokensecreat, double lati, double longi)
        {
            OAuthTokens tokens = SetTokens(accesstoken, accesstokensecreat);
            LocalTrendsOptions options = new LocalTrendsOptions();
            options.UseSSL = true;
            options.APIBaseAddress = "http://api.twitter.com/1.1/";
            PlaceInfo p = GetWoeid(lati, longi);
            AvailableTrendsOptions option = new AvailableTrendsOptions() { Lat = 
            lati, Long = longi };
            TwitterResponse<TwitterTrendCollection> trends = 
            TwitterTrend.Trends(tokens, (int)p.Woeid, options);
            return trends;
        }

0 个答案:

没有答案