Learning but need some clarifications

Apr 28, 2011 at 2:20 AM

 

I  switched to webforms from mvc because webforms should be easiest for the 2 simple things i need to do. 1 post tweets using my website specific twitter account.  and follow a hashtag.I took out the webforms sample and editted it for the standard public timeline.  The  datalist seemed to work fine.  So I went on to try to use the search and get my hashtag.  The search is an entire different animal because of the linking of queries. So i went to the api page and put the example it and tried to switch the header columns and use eval fieldname.  I got back the parameters of my query not the search results.  So i dug deeper as I am trying to learn and I read the api.  The query goes to the atomentry class

and it still didnt work. I kept getting errors.

Then i got the a tweetsharp book  in the mail I got from amazon cheap ( I ordered the LINQ book too Joe).  and I read up on twitterizer.  I began to think  am i parsing the results correctly? In those libraries  you assume the header of the http request results in a json result where I have to parse it to aspnet.  So i am thinking I am screwed now. I thought I could plug a objectdatasource and repeater in and do most of my work for me.  I thought the linqtotwitter provides all that work it its collection of classes. So how do I get the data from the linq results? do i learn json and use a deserializer?  Do I use xml and xpath to grab the elements/objects I need? I have searched all over sites and even stackoverflow for those answers if its in front of me i most of missed it.  Any help direction in doing the front end results in asp.net would be helpful.

 

Thank you and I am sorry if i asked a dumb question

Coordinator
Apr 29, 2011 at 5:05 AM

Hi,

I wrote a blog post on how to get values from Search with an MVC example:

http://geekswithblogs.net/WinAZ/archive/2011/04/28/displaying-search-results-with-linq-to-twitter-and-asp.net-mvc.aspx

If you're using WebForms, the technology is different, but the same concept applies on how to pull the information from the data into a list of objects that are bindable by a grid.

Joe

Apr 29, 2011 at 4:48 PM

 

Awesome Joe.  I plugged in all the values and code exactly and I got errors with the MVC  it didnt like the <atomentry. and the PopulateSearchViewModel(). I tried doing it twice. I must need a namespace or something.

 

 

On the good news hand. I figured out what has been burning me lol.   I am working with the public timeline so i can format it the way i want to. I am using webforms right now but could change after i keep toying with progress. Starting small and build and tinker. 

if I get a good example wiith a nice UI in webforms ill post the code so all can see and learn like I am

Coordinator
Apr 29, 2011 at 6:21 PM

I updated the blog post.  Apparently the  < and > for the generic List<AtomEntry> and List<SearchViewModel> didn't render correctly.

May 4, 2011 at 4:59 PM

how do I go about parsing the results and making it readable.

 

This example doesnt use any authenication but it shows links. images etc. 

http://www.dotnetcurry.com/ShowArticle.aspx?ID=536

Coordinator
May 4, 2011 at 5:41 PM

The blog post above, API documentation, and samples in the downloadable source code show how to use LINQ to Twitter to obtain results from the Twitter API.  If there's a problem with the LINQ to Twitter library, I can provide assistance here.  However, for help in learning a technology, such as ASP.NET, you should pursue assistance in venues for that specific technology.  For example, http://www.asp.net/ is an excellent resource for learning and getting help on using ASP.NET.  If you find a bug with LINQ to Twitter or need help making a query, let me know.

May 5, 2011 at 12:17 PM

Thanks Joe,  i figured it out. I had to html.raw encode to make it show in html. I am sure there is a better way but it looks nice.   Every answer is staring me in the face but sometimes i get frustrated.