Category : linkedin

I try to use the Linkedin API for several things including posting content on my business page. All products have been added to the Linkedin Developper platform and I use the following scopes: rw_organization_admin w_organization_social r_liteprofile r_organization_social w_member_social Here is my code: const params = { content: { contentEntities: [ { entityLocation: "https://www.example.com/content.html", thumbnails: [ ..

Read more

I have a website that has some articles that I’d like to share on LinkedIn. I’m using the following code to make that happen: HTML on the article page: <a href="" target="_blank" class="js_linkedin-share">Share on LinkedIn</a> JavaScript that loads on the article page: let shareUrl = window.location.href; document.querySelector(‘.js_linkedin-share’).setAttribute(‘href’, ‘https://www.linkedin.com/sharing/share-offsite/?url=’+shareUrl); When the page loads, it should set ..

Read more

I am implementing linkedin login strategy with passport in nestJS. What I have right now is that I have a button "Login with linkedin" points to auth/linkedin. @Get(‘auth/linkedin’) @UseGuards(AuthGuard(‘linkedin’)) async linkedinAuth(@Req() req) { } Which works great and takes me to the linkedin login page and hits back my callback URL which is auth/linkedin/callback with ..

Read more

I am using this package with NestJs for passport LinkedIn login as nestjs uses ‘@nestjs/passport’ on top ‘passport’ I have tried it with : import { passport } from ‘passport’; and passed it to the constructor so that I can use it e.g this.passport. The documentation says that use it like : app.get(‘/auth/linkedin/callback’, passport.authenticate(‘linkedin’, { ..

Read more

I’m currently looking for ways to change the styling of embedded posts. I know you can’t access the DOM of an iframe directly, but I found a way to do so here. window.onload = function() { let frameElement = document.getElementById("myiFrame"); let doc = frameElement.contentDocument; doc.body.innerHTML = doc.body.innerHTML + ‘<style>.bar {width:45%;}</style>’; } This method great on ..

Read more

I want to retrieve all posts from my linked in organization. I have read: https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/consumer/context and I have created my application and got some permissions. However, I am not able to perform the auth request. Below are some expressjs endpoints for testing the authentication. The 2 legged auth work fine: const url = ‘https://www.linkedin.com/oauth/v2’; const ..

Read more