1

How can I view the raw XML or Json response when doing a search for users using the LinqToTwitter library? I'm using the SingleUserAuthorizer for oAuth.

If you have any ideas using other libraries or even a simple oAuth framework, I'm open to suggestions.

Thanks.

Joe Mayo
  • 7,501
  • 7
  • 41
  • 60
draconis
  • 599
  • 1
  • 5
  • 16

2 Answers2

2

TwitterContext has a RawResults property you can use.

Joe Mayo
  • 7,501
  • 7
  • 41
  • 60
0

If this is just for debugging purposes, I'd use Wireshark or Fiddler - that way you get to see the complete HTTP requests/responses.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • Unfortunately, it's not. I'm already using Fiddler to view the raw response. But I need the results inside my ASP.NET application. – draconis Oct 18 '11 at 11:44
  • @draconis: So why do you need the *raw* results rather than just what the API gives you? It sounds like a bit of an encapsulation violation - other than for debugging, you shouldn't usually care about the bits under the hood, just the results. – Jon Skeet Oct 18 '11 at 11:45
  • My client asked me to use Juitter, which is a client-side jQuery app, to display the Twitter query results. But he asked me to retrieve the results server-side for security reasons (use of oAuth). So - I have a page that queries Twitter, then outputs the raw results. Juitter does a json call on my page, retrieves the results and displays them. – draconis Oct 18 '11 at 11:49
  • @draconis: It sounds like the best bet would be to modify LINQ to Twitter in this case. It's open source, so it may well be pretty straightforward... check the licence, of course. – Jon Skeet Oct 18 '11 at 11:51
  • I've already got this working for the tweet search page. That's fine because I do the request and response handling manually, so the raw http response is accessible. But for user search, oAuth is required, and I don't have the know-how to code it myself at a webrequest/webresponse level. – draconis Oct 18 '11 at 11:53