Topics


Blogs


Forums


Samples


Media


Labs


Resources

 




DevCentral > Weblogs > Joe Pruitt - A Software Architect's take on Network Security
 Introducing AskBing – The PowerShell Bing Twitter Proxy
posted on Monday, June 08, 2009 11:36 AM

TwitterBingLast week I posted a PowerShell function library for Microsoft’s newly introduced search engine at Bing.com.  The function library was appropriately named PoshBing. There was a log of interest in the script so I quickly moved it off my blog and onto a CodePlex project under PoshBing.

Working on the command line is fun and all, but since I spend a good portion of my time accessing my twitter account, I figured it would be a bit of fun to integrate it with my previously released PoshTweet PowerShell twitter library.

So, after an hour or so of coding it up and creating the @askbing twitter account, I’ve got it up and running. 

Using it is as simple as posting a message mentioning the @askbing account.  The Usage is as follows:

@askbing [sourcetype [options]] question_or_search_terms

If you omit the sourcetype it will default to “web”.  The following sourcetypes and options are currently available:

  • @askbing image iPod
  • @askbing instantanswer feet in a mile
  • @askbing news FFIV
  • @askbing mobileweb games
  • @askbing phonebook “F5 Networks”
  • @askbing relatedsearch “Xbox”
  • @askbing spell Is this missspelled?"
  • @askbing web Apple
  • @askbing translation en:es Hi, how are you?
  • @askbing video The Pick of Destiny

The only source type that includes a separate option is “translation”  By default it will translate from English to Spanish.  If you want to override these languages, you can use the “from:to” option to override these defaults.  The values for the from and to languages

  • Ar = Arabic
  • zh-CHS = Simplified Chinese
  • zh-CHT = Traditional Chinese
  • Nl = Dutch
  • En = English
  • Fr = French
  • De = German
  • It = Italian
  • Ja = Japanese
  • Ko = Korean
  • Pl = Polish
  • Pt = Portuguese
  • Ru = Russian
  • Es = Spanish

After you post an @reply to @askbing, you should expect a @reply to your account within a minute or so.

Since I’ve only spent an hour or so on this, there are bound to be some issues so please let me know if you find any.  Here' are a few known issues:

  1. It queries it’s @replies every 60 seconds and only queries 100 entries so if this ever gets more popular that that, I’ll need to enhance the request logic.
  2. It only returns the first entry returned from the bing services.  I might change this to a random entry later on.
  3. It has little error handling so if you get a garbled response, then that’s likely the reason.
  4. It uses tinyurl for Url shortening which is sometimes fairly flaky.
  5. Probably more…

So, when you’ve got some time, Send a @reply to @askbing and see how it works for you.  I’d love to hear any and all feedback.

-Joe



 
      

Feedback


6/9/2009 9:49 AM
Gravatar Thank you for submitting this cool story - Trackback from progg.ru
progg.ru

6/9/2009 10:44 AM
Gravatar I tried out askbing for woodturning suppliers tacoma washington and the result was a Google Directory result page.
Tim Spaulding

6/9/2009 11:03 AM
Gravatar @progg.ru Thanks for the links to my post!

-Joe
Joe Pruitt

6/9/2009 11:04 AM
Gravatar Tim, is that a bad thing? Maybe the Google directory search has more than the bing engine has at this time for Woodturning suppliers. B-).

You can't accuse them of stacking their results to their own sites...

-Joe
Joe Pruitt

6/18/2009 9:46 PM
Gravatar is it possible to make the codes for chines a bit shorter and easier to remember?
tom

6/19/2009 8:04 AM
Gravatar Of course I could make some changes if you'd like. Just give me some examples to get me started. I'm not sure I understand what you mean by "chines"...

-Joe
Joe Pruitt

7/29/2009 12:45 AM
Gravatar hmm, thats a great idea for bing to try to grab some market share from using twitter.. i wonder if it will work
chris

7/29/2009 9:32 PM
Gravatar very nice tuts. but is it possible to make the codes for chines a bit shorter and easier to remember?
Sharen

8/5/2009 10:48 AM
Gravatar wow thanks for the script ! i wonder if it will work lately
hamka

8/7/2009 9:25 AM
Gravatar Very good tutorial.
Thats a great idea for bing to try to grab some market share from using twitter.

I will try that.
Business Advice Forum
 Leave Feedback
Title  
Name  
Email
Url
Comments   
Please add 7 and 5 and type the answer here: