如何显示Twitter的用户时间表? [英] How to display twitter user timeline?

查看:1110
本文介绍了如何显示Twitter的用户时间表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这个code让Twitter用户时间轴:

I'm getting a twitter user timeline by this code:

http://pastebin.com/LrzRVM8g

但我不知道如何从ASCX文件的网站上显示用户的时间线。
请帮助我..

But I don't know how to display user timeline on website from ascx file. Pls help me..

推荐答案

的ASCX文件是一个简单的用户控件。您可以控制​​通过发送的数据表单或网页上添加到您的网页和环路和填充等控制。

The ascx file is simply a usercontrol. You can add the control to your page and loop through the data sent and populate other controls on your form or webpage.

列表[动态] =对象serializer.Deserialize [列表[动态]] {} responseData;

List[dynamic] objects = serializer.Deserialize[List[dynamic]]{responseData};

从code上面的线给出了数据返回的JSON动态对象的列表。
由于该类型是动态的,你需要知道的JSON参数,当您试图以该值相应映射到读取数据。

The line above from the code gives a list of dynamic objects from the JSON data returned. Since the type is dynamic, you would need to know the JSON parameters when you try to read the data in order to map the values accordingly.

您可以简单的for循环做的物对象,并把循环中断点,看看有什么返回值。当您看到的值,你可以做你想做与他们不管。

You can simply do a for loop on the "objects" object and put a breakpoint within the loop to see what the return values are. After you see the values, you can do whatever you want with them.

P.S:你需要改变的秘密和消费者键来匹配来自Twitter用户时间轴给出的实际的密钥。 (我希望在样品code可见的是不是你将要使用的实际以假乱真)。

p.s: You will need to change the secret and consumer keys to match the actual keys given for the user timeline from Twitter. (I hope the ones visible in the sample code are not the actual real ones you will be using).

这篇关于如何显示Twitter的用户时间表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆