linkedpush (site)
Converts your GitHub pushes to LinkedIn posts, to maximize exposure.
linkedpush-oauth-tictok-comp.mp4
The application PORT
is set to default 3000
. You can change it if you want.
- Rename the
.env-template
file to.env
. - Expose (deploy) this repository to the internet using through whatever means you prefer. I recommend ngrok, you must initiate it to your
PORT
. This link will be yourREDIRECT_URL
, you will need it for the following steps as well.
- Create a LinkedIn developer account.
- Create a new app.
- Fill in the required fields (you will need a company page, you can set it up here if you don't have one).
- Request access to all 3 products.
- Navigate to "Auth". Add the "Client ID" and the "Client Secret" to the
.env
file accordingly. Add a redirect URL which will be your exposed root URL +/api/auth
. "Update" the redirect URL.
- Navigate to your repository's settings.
- Navigate to "Webhooks".
- Add a new webhook.
- Set the "Payload URL" to your exposed root URL +
/api/publish
. Change "Content Type" to "application/json". "Add webhook" to submit.
- Run
yarn install
ornpm install
to install the dependencies. - Run
yarn dev
ornpm run dev
to start the server. - Navigate to your exposed root URL +
/api/auth-url
. - Sign in to LinkedIn and authorize the app.
- Simply commit with the
@linkedpush
string in the commit text (don't worry@linkedpush
will be removed from the post text). - Push.
- Your commit message will be transformed into a LinkedIn post!
- Your token is stored in the server's memory, so if you restart the server, you will need to re-authorize the app.
- There are certain characters that are not allowed when posting via the API so the post will not go through. Here are some of them:
\n
,\r
,\t
, possibly more. The following characters are automatically removed by linkedpush so that the post goes through:(
,)
,@
.