X4Delphi
Delphi Component for Twitter API interaction! Empowering developers with a range of functions for seamless action execution on the Twitter platform.
Install / Use
/learn @aso14/X4DelphiREADME
X4Delphi Component v 1.1.0
Sponsorship
Dear Delphi Community,
We're on a mission to enhance our Open Source X4Delphi Component and need your help! To take our component to the next level, we require Basic access to the Twitter API for development purposes.
Your support is essential to us!
How You Can Help:
- Make a donation to support our cause.
- Your contribution matters, whether it's feedback, testing, or code contributions.
Thank you for supporting the growth and improvement of X4Delphi!
| Sponsor | |---------------| | Weather Display |
Telegram Group : https://t.me/x4delphi

New Update 1.1.0
- You can now Sign with Twitter easily !

Introduction
This is a Delphi Component for interacting with X ( Twitter ) API. It provides a set of functions to perform various actions.
- Compatibility: VCL, FMX
- Tested on Delphi: 11 Alexandria CE
- Version: 1.1.0
- Developer: Silas AÏKO
Getting Started
To use this component in your Delphi project, follow these steps:
Clone or Download the Library Source Code:
- Clone the component repository or download the source code as a ZIP file from the GitHub repository.
- Unzip the files into a directory of your choice.
Configure RAD Studio Library Paths:
- Open RAD Studio and navigate to "Tools > Options... > Language > Delphi."
- Under the "Library" section, add the "\Sources" path from the library source code to the library paths for each platform you want to compile.
Compile and Install the Package:
- Open the
Twitter.dprojfile located in the "Package" folder of the component source code. - Compile and install the package
Twitter.bpl. This step may involve right-clicking on the project file and selecting "Compile" and then "Install."
Available Functions
| Procedure / Function | Description | Example Usage
|-----------------------------|------------------------------------------------------|--------------
| CreateTweet | This procedure allows you to create a tweet on Twitter. Simply provide the text you want to tweet, and it returns a response through OnAuthenticated Event containing relevant information about the tweet. | Twitter1.CreateTweet('Hello, Twitter!');
| DeleteTweet | With this function, you can delete a tweet from Twitter by providing its ID (AId). It returns a boolean as response to indicating the success or failure of the deletion operation.| Resp := Twitter1.DeleteTweet(TweetId);
| CreateTweetWithContent | This procedure enables you to create a tweet with both text and media content (such as images or videos). | Twitter1.CreateTweetWithContent('AText','Images_videos_path');
| SignIn | This procedure enables you to use Log in with Twitter based on OAuth | Twitter1.SignIn;
CallBack URL
http://localhost:3000/auth/twitter/callback
Examples for Available Functions
Set up your Twitter Developer account
You need to create a developers account :
- How Create a developers account : https://developer.twitter.com/en/portal/dashboard You need to create a developers account :
- Access Token; Bearer Token; Consumer Key; Consumer Secret; Token Secret;
CreateTweet
This procedure allows you to create a tweet on Twitter.
Twitter1.CreateTweet('Hello, Twitter!');
Event : OnTweetSent
procedure TForm1.Twitter1TweetSent(ATweetId, ATweet: string);
begin
// Write your code here.....
end;
DeleteTweet
With this function, you can delete a tweet from Twitter by providing its ID (AId).
var Resp := Twitter1.DeleteTweet(ATweetId);
CreateTweetWithContent
This procedure enables you to create a tweet with both text and media content (such as images or videos).
Twitter1.CreateTweetWithContent('AText','Images_videos_path');
Event : OnTweetSentWithContent
procedure TForm1.Twitter1TweetSentWithContent(ATweetMediaId: string);
begin
// Write your code here.....
end;
SignIn
Log in with Twitter.
Twitter1.SignIn;
Event : OnAuthenticated
procedure TForm1.Twitter1Authenticated(AIsAuth: Boolean);
begin
// Write your code here.....
end;
Tutorial
License
This library is released under the MIT License.
Feel free to contribute, open issues, or provide feedback!
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR

