Quicklinks
Twitter is a popular social networking service that enables its users to send and read messages called Tweets. Tweets are text-based posts of up to 140 characters. They are displayed on the author's profile page.
Twitter users can send and receive tweets through the Twitter website or through compatible applications. Applications that want to send or receive Tweets have the option of using Twitters HTTP based RESTfull API. The ActiveXperts Twitter Toolkit provides a user friendly wrapper around Twitters own HTTP based API.
The ActiveXperts Twitter API supports the following:
This tutorial describes how the Twitter Toolkit can be integrated in Delphi projects.
Download the Twitter Toolkit from the ActiveXperts web site and start the installation. The installation guides you through the installation process. Download now »
Launch Delphi (for instance 'Delphi 2005') from the Start menu. Choose 'New' from the 'File' menu and select your preferred kind of application, for instance: 'VCL Forms Application - Delphi for Win32'. A new Form is displayed in the workspace.
(Click on the picture to enlarge)
Now that a new project has been created, you must add a reference to ActiveXperts Twitter Toolkit in the project to be able to use the ActiveXperts Twitter Toolkit object. To do so, choose 'Import Component...' from the 'Component' menu. The Import Components' dialog appears. Select 'Import a Type Library':
(Click on the picture to enlarge)
In the 'Registered Type Libraries' page, select 'ActiveXperts Twitter Toolkit Type Library' and click 'Next':
(Click on the picture to enlarge)
In the 'Components' page, leave all fields default and click 'Next':
(Click on the picture to enlarge)
In the 'Install' page, select 'Create Unit' and click 'Next':
(Click on the picture to enlarge)
The interface code is generated now and is shown in the twitter-componentLib_TLB tab of the project.
From the Project Manager, open Unit1.bas and add the twitter-componentLib_TLB to the 'Uses' statement to refer to the ActiveXperts Twitter Toolkit library:
(Click on the picture to enlarge)
In the 'private' or 'public' section, declare the following objects:
objTwitter : ITwitter
You can now create the objects, for instance in the 'FormCreate' function:
objTwitter := TTwitter.Create(Form1).DefaultInterface;
There are many working samples included with the product. You can also find them on the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/twitter-component
The Twitter Toolkit can be used by any of the following operating systems: