Search code examples
phpapilinkedin-api

Fetch LinkedIn-feeds from a company's page - up-to-date-info


I would like to fetch the feeds (e.g. content & title & thumbnail) of a company's page and display them somewhere else, without anyone having to log in. But the information on how to go about it or if it's even possible is very contradictory or deprecated.

First of all: Is it possible (March 2019)?

If so, which information is correct: - Do I have to apply for a partnership or something similar OR - Is there a Request I can make as there was in Version 1 of the LinkedIn-API? (Preferably I'd like to use PHP fpr the request.)

What I've found are the following solutions and neither seem to work: - the old version 1 - Activity Feed API - Share API - UGC Post API - only possible with partnership (https://developer.linkedin.com/partner-programs); here I could submit an APP:https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program, but what's the difference to creating an app with my-apps? - not possible anymore

Which is correct? Which API do I have to use?

Thank you very much for the suggestions.

UPDATE - I tried the following:

I registered a testapp under https://www.linkedin.com/developers/apps.

This provides me with a Client-ID and a Client-Secret.

I used this as described here: https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=linkedin/consumer/context, but the response I get is:

{
    "error": "access_denied",
    "error_description": "This application is not allowed to create application tokens"
}

Researching this, I found the following information:

Can I get an access token for my application that doesn't require a member to login?

We do not provide access tokens for applications that are not associated with a particular LinkedIn member.

If your application requires you to make API calls in an automated way - without user interaction, you need to bootstrap the first access token request by manually signing in, and then ensure that your application refreshes the token automatically prior to expiry to avoid the need for additional human authentication. (https://developer.linkedin.com/support/faq)

This rather sounds like it's not possible to write an application for a company, without owning their LinkedIn-profile...

But I also found this:

Client Credential Flow (2-legged OAuth): https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=linkedin/consumer/context: Contributors If your application needs to access APIs that are not member specific, use the Client Credential Flow. Your application cannot access these APIs by default. Contact us to have your application granted permission to use this flow. (LinkedIn API: Access Denied when getting Access Token)

But this information is also again from 2014 and LinkedIn changed their authentication method some time around March last year...

I really don't know which information is up-to-date and whom to contact or where to register my application... The problem is, I have to know this beforehand before I can register my actual application.


Solution

  • You have to apply for the LinkedIn Marketing Program and request r_organization_social and w_organization_social permissions.

    This was a permission they used to give freely but do not any longer.