This Visual Basic example demonstrates how to use the Tortuga Technorati API ActiveX component to return a list of blogs linking to a specific URL.
The free Tortuga ActiveX can be downloaded here: ActiveX Download
' Technorati CosmosQuery Visual Basic Example
Dim tech As New Technorati
' An API key is required. You can get the Technorati API Key
' from http:'www.technorati.com/developers/
tech.Key = "zzzzzzzzzz"
' Get the freshest links to a target URL.
tech.CosmosType = "links"
' Cosmos lets you see what blogs are linking to a given URL.
Dim rssDoc As Rss
Set rssDoc = tech.CosmosQuery("http://www.boingboing.net/")
If rssDoc Is Nothing Then
MsgBox tech.RawQueryResponse
Else
' Success! Let's get some information...
' The RSS response always has a single channel. The information will
' be contained within the channel.
Dim channel As Rss
Set channel = rssDoc.GetChannel(0)
numInboundBlogs = channel.GetInt("tapi:inboundblogs")
List1.AddItem "Num Inbound Blogs: " + Str(numInboundBlogs)
numInboundLinks = channel.GetInt("tapi:inboundlinks")
List1.AddItem "Num Inbound Links: " + Str(numInboundLinks)
' Iterate over the blogs linking to our target blog:
For i = 0 To channel.NumItems - 1
Dim item As Rss
Set item = channel.GetItem(i)
blogTitle = item.GetString("title")
blogUrl = item.GetString("link")
List1.AddItem blogTitle
List1.AddItem blogUrl
List1.AddItem "----"
Next
' The RSS response is also available in the RawQueryResponse property.
Text1.Text = tech.RawQueryResponse
End If