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
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
To use this component in your Delphi project, follow these steps:
- 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.
- 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.
- Open the
Twitter.dproj
file 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."
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; |
https://localhost:3000/auth/twitter/callback
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;
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;
With this function, you can delete a tweet from Twitter by providing its ID (AId).
var Resp := Twitter1.DeleteTweet(ATweetId);
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;
Log in with Twitter.
Twitter1.SignIn;
Event : OnAuthenticated
procedure TForm1.Twitter1Authenticated(AIsAuth: Boolean);
begin
// Write your code here.....
end;
This library is released under the MIT License.
Feel free to contribute, open issues, or provide feedback!