Ti trovi qui:

ActiveXperts.it > Twitter-component

ActiveXperts Twitter Toolkit

quicklinks


Aggiungi le funzionalità di Twitter alle tue applicazioni Windows o Web

ActiveXperts Twitter Toolkit consente di integrare le funzionalità di Twitter a qualsiasi applicazione Windows o Web.

  • Facilità di uso API
  • Inviare Tweets
  • Visualizzare differenti linee tempo
  • Trovare utenti e Seguire
  • 32 bit Activex e 64 bit Activex incluso
  • Campioni disponibili in C#, VB, ASP.NET, HTML, PHP, Javascript, Delphi e altri

ActiveXperts Twitter Tooolkit ha le seguenti funzionalita`:

  • Pubblica i tuoi tweet su Twitter con il proprio software
  • Navigazione facile attraverso il proprio tweet o un qualsiasi tweet su un'altra linea tempo
  • Navigazione facile tramite amici e follower
  • Integrato OAuth (Autorizzazione Open) supporta sia client che casi d'uso Web
  • Accedere a tutte le funzioni che sono pubblicamente disponibili su interfaccia Twitters REST
  • Attestato di essere un'interfaccia per l'invio personalizzato, OAuth firmato, richiede l'interfaccia Twitter REST
  • Activexperts Twitter Toolkit è un componente ActiveX/COM che può essere integrato in qualsiasi ambiente di sviluppo Windows

Requisiti di sistema

Activexperts Twitter Toolkit è disponibile come componente a 32 bit o a 64 bit (entrambe parti del prodotto):

  • twittertk.dll - componente a 32 bit;
  • twittertkx64.dll - componente a 64 bit

ActiveSocket è compatibile con i seguenti sistemi operativi:

  • Windows 2008 (32 e 64 bit)
  • Windows 2003 (32 e 64 bit)
  • Windows 2000 Server e Professional (32 bit)
  • Windows 7 (32 e 64 bit)
  • Windows Vista (32 e 64 bit)
  • Windows XP (32 e 64 bit)

Esempi di frammenti di codice e applicazioni (VBScrispt)

Gli esempi di codice che seguono illustrano l'autorizzazione OAuth per un'applicazione client che usi Twitter Toolkit.

Per piu` esempi, visitare la pagina Online ActiveXperts Twitter Toolkit Samples.

Option Explicit

  Dim objTwitter, objIE
  Dim strUrl, strVerify

  ' Create the twitter object
  Set objTwitter = CreateObject( "ActiveXperts.Twitter" )

  ' Set the consumer key
  objTwitter.ConsumerKey = "..................."
  objTwitter.ConsumerSecret = ".........................................."

  ' Request an authorization URL
  strUrl = objTwitter.RequestAuthorization 
  TestSuccess

  ' Navigate to the Authorization URL
  Navigate strUrl

  ' While on the Authorization URL, ask the user to input the verification code
  strVerify = inputbox( "Enter verification code", "Enter value", "" )

  ' Trade the verify token with an access token
  objTwitter.RequestAccessToken strVerify
  TestSuccess

  ' Tweet about our success !
  objTwitter.Tweet "I'm Tweeting with ActiveXperts Twitter Toolkit !"
  TestSuccess

  ' Print the access token so it can be used again.
  WScript.Echo "Access token: " & objTwitter.AccessToken
  WScript.Echo "Access token secret: " & objTwitter.AccessTokenSecret

Inserisci i tuoi followers

Option Explicit

  Dim objTwitter, objStatus, objUser

  ' Create the twitter object
  Set objTwitter = CreateObject( "ActiveXperts.Twitter" )

  ' Set the consumer key
  objTwitter.ConsumerKey = "..................."
  objTwitter.ConsumerSecret = ".........................................."

  ' Set the user key
  objTwitter.AccessToken = ".................................................."
  objTwitter.AccessTokenSecret = ".........................................."

  ' Get all of your followers
  Set objUser = objTwitter.FindFirstFollower
  While objTwitter.LastError = 0
    WScript.Echo "--"
    WScript.Echo "Id: " & objUser.Id
    WScript.Echo "Created at: " & objUser.CreatedAt
    WScript.Echo "Name: " & objUser.Name
    WScript.Echo "Screen name: " & objUser.ScreenName
    WScript.Echo "Location: " & objUser.Location
    WScript.Echo "Description: " & objUser.Description
    WScript.Echo "Profile image: " & objUser.ProfileImage
    WScript.Echo "URL: " & objUser.URL
    WScript.Echo "Protected: " & objUser.Protected
    WScript.Echo "Followers: " & objUser.NumFollowers
    WScript.Echo "Friends: " & objUser.NumFriends
    WScript.Echo "Tweets: " & objUser.NumTweets
    Set objUser = objTwitter.FindNextUser
  Wend

Effettuare una chiamata API personalizzata

Option Explicit

  Dim objTwitter, objXML, objNodeList, strResult, i

  ' Create the twitter object and an XMLDOM object
  Set objTwitter = CreateObject( "ActiveXperts.Twitter" )
  Set objXML = CreateObject( "Microsoft.XMLDOM" )

  ' Set the consumer key
  objTwitter.ConsumerKey = "..................."
  objTwitter.ConsumerSecret = ".........................................."

  ' Set the user key
  objTwitter.AccessToken = ".................................................."
  objTwitter.AccessTokenSecret = ".........................................."

  ' Make a custom API call
  strResult = objTwitter.APICall("statuses/home_timeline", "xml")

  ' Display the results
  objXML.LoadXML(strResult)
  Set objNodeList = objXML.selectNodes("//statuses/status/text")
  For i = 0 To objNodeList.length
    WScript.Echo objNodeList(i).text
Next