GithubHelp home page GithubHelp logo

arisamiga / linkedin-rss Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 8.84 MB

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

License: GNU Affero General Public License v3.0

JavaScript 100.00%
blog-posts blogging github-actions github-workflow linkedin linkedin-api rss rss-feed rss-feed-urls blog

linkedin-rss's Introduction

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. [email protected]
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

linkedin-rss's People

Contributors

arisamiga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cdransf

linkedin-rss's Issues

Owner entity type person is not supported

Hey, can you help here ?

owner: "urn:li:person:" + ownerId,

Looks like it should be like this: "author": "urn:li:person:8675309"
https://learn.microsoft.com/de-de/linkedin/consumer/integrations/self-serve/share-on-linkedin#creating-a-share-on-linkedin

best regards Michael

{
status: 400,
headers: {
'x-li-responseorigin': 'RGW',
'content-type': 'application/json',
'x-restli-error-response': 'true',
'x-restli-gateway-error': 'false',
'x-restli-protocol-version': '2.0.0',
'content-length': '68',
date: 'Sun, 10 Dec 2023 12:26:57 GMT',
'x-li-fabric': 'prod-ltx1',
'x-li-source-fabric': 'prod-lva1',
'x-li-pop': 'prod-lva1-x',
'x-li-proto': 'http/1.1',
'x-li-uuid': 'AAYMJu7uDegAHiAVXD7aaQ==',
'set-cookie': [
'bcookie=""; domain=.linkedin.com; Path=/; Secure; Expires=Mon, 09-Dec-2024 12:26:57 GMT; SameSite=None',
'lidc="b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1061:x=1:i=1702211217:t=1702286985:v=2:sig="'
],
'x-li-route-key': '"b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1061:x=1:i=1702211217:t=1702286985:v=2:sig="'
},
body: '{"message":"Owner entity type person is not supported","status":400}'
}
Error: Failed to post on LinkedIn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.