This is the project repo for BluebirdPS, a Twitter automation client for PowerShell 7.
Due to the recent changes with the Twitter API primarily regarding the new tiers, I will no longer continue developing this project.
It should be considered stale and no new versions will be released.
The latest version, v0.8.4, seeks to correct an issue in the Free Tier with Publish-Tweet
.
This module will allow you to tweet, retweet, send direct messages, manage lists, and more, if you pay for the Basic or Pro Tiers. Otherwise, you should be able to tweet and delete tweets if using the Free Tier.
See Twitter API Documentation for details.
This module was developed for the community and accepted feedback from the community to make it what it had become.
In order to use this module, you will need to have PowerShell 7 installed and a Twitter Developer account and a Twitter Project/App created and request to API v2 Early Access.
In order to support cross-platform scenarios, PowerShell 7 was chosen as the version for this new module. Focusing on a single version will also allow us to forego handling the API calls differently between Windows PowerShell and PowerShell 7.
Please see Installing various versions of PowerShell for instructions on installing PowerShell 7. You can install it on virtually any modern operating system - Windows, MacOS, or Linux.
In order to use BluebirdPS, or any other Twitter API client or library, you will need to go through several steps to gain access to the API.
You must apply for a developer account at https://developer.twitter.com/en/apply-for-access. This process could take a couple weeks.
Next, activate your developer portal at https://developer.twitter.com/content/developer-twitter/en/portal/opt-in.
You must have a project with a developer app created in the portal.
Visit the Twitter API Getting Started page for details and additional links.
From the portal, you will need to generate the consumer key, otherwise called the API Key and Secret. The API Key is linked to your application.
You will also need to generate an Access Token and Secret. The Access Token is linked to your Twitter user account.
The application must be given access permissions of Read, Write, and Direct Message for full usage. At minimum, the application needs Read access for any Get- commands. Set-, Send-, and Publish-Tweet require Write access, while *-TwitterDM requires Direct Message access.
You can also generate a Bearer Token through the portal, or simply use the Set-TwitterAuthentication command. If your credentials are validated, the bearer token will be requested and set in the authentication file, as well.
Set-TwitterAuthentication
API Key: *************************
API Secret: **************************************************
Access Token: **************************************************
Access Token Secret: *********************************************
Start PowerShell 7 and run the following command:
Install-Module -Name BluebirdPS -Scope CurrentUser
For more information, please visit the BluebirdPS page on the PowerShell Gallery.
- Click here to go to the latest releases, then download the BluebirdPS.zip file attached to the release.
- Right-click the downloaded zip, select Properties, then unblock the file. This is to prevent having to unblock each file individually after unzipping.
- Unzip the archive.
- (Optional) Place the module somewhere in your PSModulePath.
- You can view the paths listed by running the environment variable
$env:PSModulePath
- You can view the paths listed by running the environment variable
- Clone repo to a folder of your choice.
- Change into the local repo folder.
- Install and Import Module
psake
,BuildHelpers
,PowerShellBuild
- Install dotnet (6.0)
- Run the
build.ps1
script. Import-Module -Path .\BuildOutput\BluebirdPS\<module version>\BluebirdPS.psd1
Search-Tweet -SearchString "(from:thedavecarroll)"
Get-Tweet -Id 1398279333823791104
Publish-Tweet -TweetText "A new release of #BluebirdPS will soon be released. BluebirdPS is #PowerShell 7 Twitter automation client. Check it out! https://bit.ly/BluebirdPS"
Get-TwitterList -Id 1397040831777984512 | Add-TwitterListMember -UserName thedavecarroll,BluebirdPS