Arisamiga / Linkedin-RSS

Post the latest post from your RSS Feed to your LinkedIn Profile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linkedin-RSS

Post the latest post from your RSS Feed to your LinkedIn Profile

Issues

Codacy Badge

How to use

  1. Create a folder named .github and create a workflows folder inside it, if it doesn't exist.

  2. Create a new .yml file with the following contents inside the workflows folder:

name: Linkedin blog post workflow
on:
  schedule: # Run workflow automatically
    - cron: "0 * * * *" # Runs every hour, on the hour
  workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly

jobs:
  linkedin_rss_job:
    runs-on: ubuntu-latest
    name: Post Latest RSS Post to Linkedin
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Get Latest Post / Post On Linkedin
        uses: Arisamiga/Linkedin-RSS@master
        with:
          feed_list: # Url of RSS
          ln_access_token: # Url of LinkedIn Access Token
          embed_image: # Url of embed image
Parameter Required Description Default
feed_list Your own RSS feed URL (No Default URL)
ln_access_token Your LinkedIn Access Token (No Default Access Token)
embed_image X The URL of the image you want to use in the embed. (No Default URL)
last_post_path X The path to the file you want to use to store the last post. .github/.lastPost.txt
commit_user X The username of the commiter. Linkedin-Post-Action
commit_email X The email of the commiter. linkedin-post-action@example.com
commit_message X The commit message. Update Last Post File

How to get your LinkedIn Access Token

Register the app in LinkedIn Developer Network

  • Go to LinkedIn Developer Network and create an app;
  • Select Test University or PersonalDev can be used as the company associated with the app without verification;

  • Once you made your Application go to your App and go to "Products"
  • From there Select "Share on LinkedIn" and "Sign In with LinkedIn using OpenID Connect" and "Request Access" For both of them

  • Once you have added your Products go to https://www.linkedin.com/developers/tools/oauth/
  • Select "Create a new access token" and click "Create Token" Select your app and make sure you have the openid, profile and w_member_social scopes selected.
  • Press "Request Access Token" and you will be asked to login. After Successfully logging in you will be given your Access Token.

Notices

I suggest for your ln_access_token you use a Github Secret. (Whats a Github Secret check here https://docs.github.com/en/actions/security-guides/encrypted-secrets)

Thanks to https://github.com/gfiocco/linkedin-node-api as the LinkedIn Docs are wierd..

Code and bug reporting

You can open a issue at https://github.com/Arisamiga/Linkedin-RSS

About

Post the latest post from your RSS Feed to your LinkedIn Profile

License:GNU Affero General Public License v3.0


Languages

Language:JavaScript 100.0%