What API method can be used to get all latests LinkedIn posts? - linkedin

Does linkedin-api provide an endpoint to get the latest public posts/ and comments?
Example, GitHub provides https://api.github.com/events API endpoint to get the latest public events (issues, pull requests, etc.)

Related

Wordpress API - Blog Post Review without admin login

We are using in project Wordpress API for displaying blog posts on frontend in our Nuxt 2 app. The problem is that we would like to create possibility of preview blog post's draft without being logged as admin/moderator. I could not find any entries about post draft preview on https://developer.wordpress.org/rest-api/ or about letting everyone to see them. Anyone got any clues?
The WP REST API allows you to query posts by post type (API endpoint), and filter by post status.
Check documentation about listing posts.
status: Limit result set to posts assigned one or more statuses.
type: Type of Post for the object.
https://example.com/wp-json/wp/v2/posts?status=draft
You can use WP post statuses like publish, future, draft, pending, private, or custom statuses you made.
Problem is that private and draft post statuses are protected: those are not public and cannot be queried without authentication. I just tried and indeed, I can query public posts, but I cannot query private and draft posts without my API request being authenticated.
So what you could do:
Authenticate users to the API so they can query draft and private posts
Create a custom post status that is public (public, publicly_queryable and exclude_from_search parameters), so it can be queried without authentication from the API. This way you keep private and draft statuses secured like WP wants it. And use another for "drafts that are public".
You can change the "public" status of the private and draft post statuses, so they can be queried without authentication (see example). Double-check security concerns if doing so, as it would change the WP core status design.
Try a publishing workflow plugin. Lots of them out there. Here's a free one to try...
https://wordpress.org/plugins/publishpress/
I don't know if this reroutes your other processes... but maybe you've already considered this method.

Linkedin API (v2) 5xx Errors to get organizationalEntityShareStatistics

I'm facing problems with my client because I can't get the share's statistics for his organization.
Since December 2021 the API is returning Internal Server Error for many request in the organizationalEntityShareStatistics endpoint.
API analytics
The request works for other organizations.
I have tried reaching Linkedin through their support pages but they have told me to post it here on stack overflow; In this private support request I show the app tokens used: https://linkedin.zendesk.com/hc/en-us/requests/26241?page=1 or here: https://www.linkedin.com/help/linkedin/cases/39424961
LinkedIn answered me that I should filter some posts, according to their "lifecycleState" field, which for some cases make the request fail, they should only be PUBLISHED or PUBLISHED_EDITED

LinkedIn API - How to retrieve posts where the orgazination is mentioned

Is it possible to retrieve posts where an organization is mentioned through the LinkedIn API?
I found some information in the API documentation (link below) that indicates that it is possible, but there is no information on which endpoint should be used or available details.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/social-access-control#retrieving-posts-with-organizational-mentions
Thanks!
No linkedin api, does not have feature to retrieve posts based on keyword.

Does the LinkedIn UGC API contains all shares of a LinkedIn organization?

The UGC Post API of LinkedIn is characterized as
an upcoming API that will eventually replace the Shares
API. UGC Post is currently best suited for creating and fetching video
posts. The Shares API does not support video. 1
When comparing the results of fetching posts via Shares API and UGC Post API it seems that all posts retrieved by the Shares API are also included in the UGC Post API. But since this is not stated in the documention it's difficult to rely on. Is this the case?
Can fetching the Shares API be replaced by fetching the UGC Post API by now?
Furthermore, the UGC Post API seems to drop the activity-id/urn. Does that mean activities are deprecated? Should referencing of posts via activity-id/urn be abandoned in favor of post urns of type "urn:li:ugcPost"/"urn:li:share"?
See:
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api

Google Analytics API (Real-time) in Google Sheets

I'm trying to access the Google Analytics API via Google Sheets (Google Script).
So within the script, I'm trying to use the URI as described here: https://developers.google.com/analytics/devguides/reporting/realtime/v3/reference/data/realtime/get
The API call looks something like this:
GET https://www.googleapis.com/analytics/v3/data/realtime?ids=3254435&metrics=ga%3AActiveUsers&key={YOUR_API_KEY}
Within my Google Analytics Script, I've also created a Public API Access key:
However, I can't seem to get any data whether if I'm appending the token key in the URI or within the header.
Can any one point me to the right direction?
Thanks
The public api key is for public access APIs. Data that is not owned by a user. You need to create client id from web application.
Then you will be able to authenticate it using Oauth2.
this might get you started. https://developers.google.com/apps-script/advanced/analytics
How to know when you need to be authenticated:
Public API: Aanalytics metadata API meta data doesn't belong to any user its public data anyone can access.
User data API: Google Analytics Real-time Data the data returned is owned by a user, it is not public data viewable by everyone. Documentation states
Requires authorization
If the documentation says requires authentication then you have to be authenticated to access that call.
You can use Google Analytics API easily just by enabling them in App Script.
Below is the Guide to using Real-time API in Google Spreadsheet
https://www.tatvic.com/blog/google-analytics-real-time-data-in-google-sheet/
Just like above you can use any API no need to take care of tokens.

Resources