Skip to content
/ X4Delphi Public

Delphi Component for Twitter API interaction! Empowering developers with a range of functions for seamless action execution on the Twitter platform.

License

Notifications You must be signed in to change notification settings

aso14/X4Delphi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

alt text

New Update 1.1.0

  • You can now Sign with Twitter easily !
    alt text

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:

  1. Clone the component repository or download the source code as a ZIP file from the GitHub repository.
  2. Unzip the files into a directory of your choice.

Configure RAD Studio Library Paths:

  1. Open RAD Studio and navigate to "Tools > Options... > Language > Delphi."
  2. 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:

  1. Open the Twitter.dproj file located in the "Package" folder of the component source code.
  2. 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

https://localhost:3000/auth/twitter/callback

Examples for Available Functions

Set up your Twitter Developer account

You need to create a developers account :

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!

About

Delphi Component for Twitter API interaction! Empowering developers with a range of functions for seamless action execution on the Twitter platform.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages