jquery - Displaying information from Twitter and Database in DateTime order -


i working on asp.net mvc website , querying twitter's api return data. have database backend returns posts blog.

how can put data in date order , parse view?

at moment using http://tweet.seaofclouds.com/ puts data div via jquery have added need data database , twitter when view requested.

i'm thinking can make request twitter in controller when page requested, @ same time data database , build viewmodel , parse view eg/ return view(mytwitterdbmodel);

would way or have better idea?

this have done using twitterizer library. works still not sure if correct:

public actionresult blog()         {             list<post> data = new list<post>();              post p = new post();             p.date = new datetime(2009, 08, 23);             p.title = "long time ago";             p.text = "old post";              data.add(p);              p = new post();              p.date = datetime.now;             p.title = "new post";             p.text = "blah blah ";              data.add(p);               var ds = data.select((title) => new blogdata { title = title.title, date = title.date, text = title.text });                 usertimelineoptions options = new usertimelineoptions();             options.screenname = "twiiterusername";               twitterstatuscollection recenttweets = twittertimeline.usertimeline(options);              ds = ds.concat(recenttweets.select((tweet) => new blogdata { title = tweet.text, date = tweet.createddate, text = "" })).orderbydescending(x => x.date);                 return view(ds);         } 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -