Retrieving the latest LinkedIn posts | Community
Skip to main content
New Participant
September 22, 2023
Solved

Retrieving the latest LinkedIn posts

  • September 22, 2023
  • 2 replies
  • 749 views

 

Hi team,

Could someone assist me in retrieving the latest LinkedIn posts content using the OSGi service class?

https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin%2Fcontext&tabs=HTTPS1

 

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by sherinregi-1

Hi @mahesh_tesla 

The link you have attached talks about the oAuth flow which will need browser intervention in order to complete the authentication process.

 

You can go for the below approach with client credential flow if its a company account or a generic account. 

1) Get the access token by sending the clientID and secret . Can be created as a token service and pass the credentials through OSGI configs.

2) Once you get the token you can hit the required API by passing the the authorization and retrieve the response. 

3) same can be retrieved in front end using a servlet or can be dynamically included on the page

https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=linkedin%2Fcontext

 

AEM REST API integration example

https://kiransg.com/2021/11/08/aem-rest-service-using-http-client-factory/

 

 

Hope this helps

 

 

 

 

2 replies

kautuk_sahni
Employee
September 26, 2023

@mahesh_tesla Did you find the suggestion from @sherinregi-1 helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
sherinregi-1
sherinregi-1Accepted solution
New Participant
September 25, 2023

Hi @mahesh_tesla 

The link you have attached talks about the oAuth flow which will need browser intervention in order to complete the authentication process.

 

You can go for the below approach with client credential flow if its a company account or a generic account. 

1) Get the access token by sending the clientID and secret . Can be created as a token service and pass the credentials through OSGI configs.

2) Once you get the token you can hit the required API by passing the the authorization and retrieve the response. 

3) same can be retrieved in front end using a servlet or can be dynamically included on the page

https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=linkedin%2Fcontext

 

AEM REST API integration example

https://kiransg.com/2021/11/08/aem-rest-service-using-http-client-factory/

 

 

Hope this helps