1

How to get all counts of likes of post of our page, Actually we have created a Page and posted some articles. Now I want to retrieve all likes of my post using APIs, I can get the access token from Postman. When i am run the V2 API to get data thru poastman, i got the following error: "Not enough permissions to access: GET /socialActions/". Please advise what more permission required.

Get the Access Token from postman for OAuth2.0 under Auth navigation of postman. After getting the access token, run the https://api.linkedin.com/v2/socialActions/{activity} I am getting following error { "serviceErrorCode": 65604, "message": "Empty oauth2 access token", "status": 401 }

I used in other system Postman then found following error: { "serviceErrorCode": , "message": "Not enough permissions to access: GET /socialActions/", "status": 401 }

Should be come the result data in JSON format

Shail
  • 11
  • 4
  • How are you passing the Access Token for the Activity API? – Biswajit Sep 11 '19 at 07:26
  • Here steps are defined https://learn.microsoft.com/en-us/linkedin/marketing/getting-started Through Postman, got the Access Token – Shail Sep 11 '19 at 09:32
  • @Shail have you found a solution? Got the [same question](https://stackoverflow.com/questions/72406550/getting-linkedin-company-shares-python) – Simone May 27 '22 at 16:18

1 Answers1

0

You can also use this request https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/share-statistics#sample-request

Following is sample request

https://api.linkedin.com/v2/organizationalEntityShareStatistics?q=organizationalEntity&organizationalEntity=urn:li:organization:xxxxxx&shares=urn:li:share:xxxxxxxxx&count=1000

Sample Response :

{
    "elements": [
        {
            "totalShareStatistics": {
                "shareCount": 2,
                "clickCount": 1,
                "engagement": 10,
                "likeCount": 5,
                "impressionCount": 7,
                "commentCount": 5
            },
            "share": "urn:li:share:xxxxxx",
            "organizationalEntity": "urn:li:organization:xxxxx"
        }
    ],
    "paging": {
        "count": 1000,
        "start": 0,
        "links": []
    }
}
kaushik
  • 556
  • 1
  • 7
  • 22
  • 1
    I am getting following error: { "serviceErrorCode": 100, "message": "Not enough permissions to access: GET-organizationalEntity /organizationalEntityShareStatistics", "status": 403 } Please suggest! – Shail Sep 12 '19 at 06:25
  • Your app should have access to "r_organization_social" – kaushik Sep 12 '19 at 08:38
  • @kaushik have the same issue and ```r_organization_social```` is in my app's scope. I included it in the scope when getting an access token. Have you tested above? LinkedIn's docus are not great... – Simone May 27 '22 at 16:17