A simple command line utility for posting to social networks.
Currently Supported:
Usage
Without any parameters, S will post to all social networks with available configs.
s Going out for poutine.
You can also specifiy just a single social network. For example, just Twitter:
s -t Posting this wonderful tweet from command line!
Install
Grab the latest release from the releases page, or build from source and install directly from master. S is currently built and tested against Go 1.7.
git pull https://github.com/dustinblackman/s.git
cd ./s
make install
Configuration
Configuration for social networks can be done by setting the required keys in your environment variables, but it's also possible to pass them in as parameters. See s --help
for more details.
Twitter:
Creating a twitter application can be done here. You can then generate keys and save them in your environment variables.
export TWITTER_CONSUMER_KEY=""
export TWITTER_CONSUMER_SECRET=""
export TWITTER_ACCESS_TOKEN=""
export TWITTER_ACCESS_SECRET=""
Facebook:
Create an application on Facebook here. Afterwards use the Graph explorer to create a user access token that has the publish_actions
scope. You can extend the life of the key by clicking the I
next to the token to open the access token tools.
export FACEBOOK_APP_KEY=""
export FACEBOOK_APP_SECRET=""
export FACEBOOK_USER_TOKEN=""
Alfred Workflows
Alfred workflows are available here which allows you to use S directly from Alfred. Due to S needing access to environment variables for configuration, there are two editions to the work flows for bash
and zsh
.