Is it possible to get all Linkedin Profile Posts with Linkedin Api - linkedin

I am trying to use linkedin API for showing the feeds of my profile what i have posted from the day first. posts include media, images, video etc. I would like to know is there any Api available for that where i can pass some parameter and get all posts of my linkedin Profile. Please help if anyone have done this before
Thanks!!

You can Retrieve Shares with the api using the person id:
curl -X GET \
-H "Authorization:Bearer token<>" \
'https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:person:{id}'
You can retrieve the person id with the Retrieve Authenticated Member's Profile API
curl -X GET \
-H "Authorization:Bearer <token>" \
'https://api.linkedin.com/v2/me?projection=(id)'
Hope this help

You can use the official linkedin api documentation to get all your posts id , then using that you can retrieve more information. Refer https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api?tabs=http

Related

Google Analytics Ecommerce reporting data not showing in the google Analytics website?

based on the document Google Analytics Measurement Protocol, the data in the Google Analytics website doesn't show?
the following is the reporting data:
curl -X POST \
https://www.google-analytics.com/collect \
-d 'v=1&tid=UA-XXXXX-Y&cid=amp-TJxEJ0a7egKhUQj2Geu5wXnfK7HO1cEb6OW8gI3kZEvPxCh1CRoQzZBGCW6nin87&t=transaction&ti=6990543639790315973&tr=1.23&cu=USD'
and
curl -X POST \
https://www.google-analytics.com/collect \
-d 'v=1&tid=UA-XXXXX-Y&cid=amp-TJxEJ0a7egKhUQj2Geu5wXnfK7HO1cEb6OW8gI3kZEvPxCh1CRoQzZBGCW6nin87&t=item&ti=6990543639790315973&in=The Formidable Son-In-Law: The Charismatic Lucas Gray&ip=1.23&iq=1&ic=19402521105225105&cu=USD'
the same code PC's data in google Analytics website is correct, but M's data is not showing.
Try to check in View settings if is checked exclude hit from bot and spider:
And remove the tick.

I am trying to read users calendar events using Google Calendar API. In the attendees object, I see 'displayName' only for few participants

I am trying to read users calendar events using Google Calendar API. In the attendees object, Sometimes I see 'displayName' only for few participants. Most of the times the field is empty.
In the documentation it says :-
attendees[].displayName string The attendee's name, if available. Optional.
Is there a way to get all the attendees display names from the API like how we see in the Google Calendar Application?
Answer:
If you have the email addresses you can do a people.listDirectoryPoeple request to get their name and profile pictures.
More Information:
The people.listDirectoryPeople method of tha People API can list users, returning fields specified in the readMask parameter of the request.
A source is mandatory, so to get domain profiles, this should be set to DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE.
In order to obtain the names and photos of the users, you can make a request of the form:
curl \
'https://people.googleapis.com/v1/people:listDirectoryPeople?readMask=photos%2Cnames%2CemailAddresses&sources=DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE&key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed
Which you can then process to find the corresponding photo and name for each email address you have.
NB: If a specific user does not have a profile picture uploaded, then their respective response object will not have the photos field.
References:
Method: people.listDirectoryPeople | People API | Google Developers

Company Pages API - V1 Deprecation

LinkedIn is set to deprecate the v1 APIs on March 1st. I have a solution that uses the v1 company page APIs (https://api.linkedin.com/v1/companies/) to retrieve a list of updates posted to a company page.
I've read through the documentation and the migration information and unfortunately the documentation is unclear in terms of how to get access to the updated company pages APIs.
The documentation seems to imply that in order to get access to the API's you must submit an application for approval, however the form (https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program) seems to indicate that they are accepting applications for a number of their APIs but the Company Pages API is not on the list.
At one point this page noted that access to the company pages API would not require a submission however that appears to have been removed.
I'm hoping someone has encountered this and can provide some guidance on how to proceed with getting access and if the application is required. I've tried reaching out to LinkedIn directly without much luck. All help is greatly appreciated.
you can do it with /ugcPosts query. Ask with q=authors and provide a list list of companies in authors query parameter.
You can test it with curl:
curl -H "Authorization: Bearer __ACCESS_TOKEN__" -H "X-Restli-Protocol-Version: 2.0.0" "https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List(urn%3Ali%3Aorganization%3A__ORGANIZATION_ID__)"
Dont forget to replace __ACCESS_TOKEN__ and __ORGANIZATION_ID__.

cannot get video posts of linkedin company page through api

Linkedin api does not include shares with video while fetching all posts of a company page. It wasn't working in both v1 and v2 apis.
Consider this post with video and it's missing while fetching through api.
curl "https://api.linkedin.com/v1/companies/12345/updates?format=json&count=20&oauth2_access_token=XXX"
In v2:
curl
"https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:organization:12345&count=25&oauth2_access_token=XXX"
{ "elements":[...], "paging":{ "total":24, "count":25, "start":0,
"links":[ ] } }
Can anyone help on this?
You need to use the v2/ugcPosts endpoint - see
https://developer.linkedin.com/docs/guide/v2/shares/ugc-post-api#get
Everything in the Linkedin API except the video can be found under Linkedin Shares API.
https://developer.linkedin.com/docs/guide/v2/shares/share-api
Videos in Linkedin are simply technically termed as UGCPost-User Generated Content Post
https://developer.linkedin.com/docs/guide/v2/shares/ugc-post-api

How to read the statistics for LinkedIn posts?

I want to create a simply app to get statistics (read, liked, commented) for my LinkedIn posts.
LinkedIn sends me a periodic emails with this statistics, but I can't find the correct API for this.
You can retrieve number of likes and number of comments via the network updates API once you have obtained the key for a specific post (="share"):
curl -H "Authorization: Bearer <token>" "https://www.linkedin.com/v1/people/~/network/updates/key=UPDATE-xxxxxxx-xxxxxxxxxxx?format=json" | jq '.numLikes, .updateComments._total'
that info is also available in the list of updates as obtained from:
curl -H "Authorization: Bearer <token>" https://www.linkedin.com/v1/people/~/network/updates?format=json

Resources