Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WindowsPhone8-TwitterAPI_C#_Twitter_Windows Phone 8 - Fatal编程技术网

C# WindowsPhone8-TwitterAPI

C# WindowsPhone8-TwitterAPI,c#,twitter,windows-phone-8,C#,Twitter,Windows Phone 8,我正在做一些研究,似乎找不到一个确定的方法来查询Twitter的API,以便使用C#在WP8上获取用户的推文 twitter用户不是我自己的帐户,我只想检索tweets,不发布任何tweets 因此,我是否需要对自己/我的应用程序进行身份验证?TweetSharp库是否适合我的目标?我使用了以下示例: 我在twitter开发网站上创建了一个新的应用程序用户:。设置好后,我基本上复制并粘贴了AuthenticateWith和TwitterService方法中的密钥 我还没有准确地解决如何显示数据的

我正在做一些研究,似乎找不到一个确定的方法来查询Twitter的API,以便使用C#在WP8上获取用户的推文

twitter用户不是我自己的帐户,我只想检索tweets,不发布任何tweets


因此,我是否需要对自己/我的应用程序进行身份验证?
TweetSharp
库是否适合我的目标?

我使用了以下示例:

我在twitter开发网站上创建了一个新的应用程序用户:。设置好后,我基本上复制并粘贴了
AuthenticateWith
TwitterService
方法中的密钥

我还没有准确地解决如何显示数据的问题,但在运行时,我可以看到数据被传入

if (NetworkInterface.GetIsNetworkAvailable())
{
    //Obtain keys by registering your app on https://dev.twitter.com/apps
    var service = new TwitterService("abc", "abc");
    service.AuthenticateWith("abc", "abc");

    //ScreenName is the profile name of the twitter user.
    service.ListTweetsOnUserTimeline(new ListTweetsOnUserTimelineOptions() { ScreenName = "the_appfactory" }, (ts, rep) =>
    {
        if (rep.StatusCode == HttpStatusCode.OK)
        {
            //bind
            this.Dispatcher.BeginInvoke(() => { tweetList.ItemsSource = ts; });
        }
    });
}
else
{

    MessageBox.Show("Please check your internet connestion.");
}