2010-12-13 40 views

回答

4

我很感興趣,我看到它是如何工作的,這可能讓你開始:

Option Infer On 

Imports System.Net 
Imports System.Web 

Module Module1 
    Sub Main() 
     Dim wc = New WebClient() 
     Dim login = "your_login" 
     Dim apiKey = "your_apikey" 
     Dim longUrl = HttpUtility.UrlEncode("http://stackoverflow.com/questions/4427104/vb-is-there-any-possibility-to-call-the-bit-ly-api") 
     Dim request = String.Format("http://api.bit.ly/v3/shorten?login={0}&apiKey={1}&longUrl={2}&format=txt", login, apiKey, longUrl) 
     Dim result = wc.DownloadString(request) 
    End Sub 

End Module 

API文檔可以在這裏找到:http://code.google.com/p/bitly-api/wiki/ApiDocumentation

+0

非常感謝!現在我明白了;) – 2010-12-13 10:09:17

相關問題