简体   繁体   English

c#Windows Phone 8.1 Twitter提要

[英]c# Windows Phone 8.1 Twitter Feeds

I have ac# windows phone 8.1 application and I am able to do the login validation using this code: 我有ac#Windows Phone 8.1应用程序,可以使用以下代码进行登录验证:

             user = await App.MobileService.LoginAsync(MobileServiceAuthenticationProvider.Twitter);

            if (user.UserId != "")
                message = "You are now signed in -" + user.UserId;
            else
                message = "You must log in. Login Required";

            var dialog = new MessageDialog(message);
            dialog.Commands.Add(new UICommand("OK"));
            await dialog.ShowAsync();

I want to retrieve twitter feeds of this particular user. 我想检索此特定用户的Twitter feed。 I tried using TwitterSharp API but it works only for windows phone 8 apps and not 8.1 我尝试使用TwitterSharp API,但它仅适用于Windows Phone 8应用,不适用于8.1

Your question is way too broad, but there are some steps you can take to get the desired result. 您的问题过于笼统,但是您可以采取一些步骤来获得理想的结果。

  1. Check out LINQ to Twitter , one of the best Twitter libraries out there 查看LINQ to Twitter ,那里是最好的Twitter库之一
  2. Read the documentation about fetching Twitter feed with this library 阅读有关使用此库获取Twitter feed的文档

It comes down to doing something like this: 归结为要做这样的事情:

var tweets = await (from tweet in twitterCtx.Status
                    where tweet.Type == StatusType.Home
                    select tweet).ToListAsync();

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

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