How to get media url with Linkedin Posts API? - api

I am trying to fetch the posts of an organization by using the https://api.linkedin.com/rest/posts endpoint which works fine. In the response I get media urn fields which i need to resolve via the https://api.linkedin.com/rest/images endpoint to get the URL of the images of the posts. Is there any way to get the image URL on the https://api.linkedin.com/rest/posts endpoint?
I assume this is possible via projection because of the following statement in the API documentation:
You can include the following types of content in a Post:
Images
Videos
Article
Carousels
MultiImage
Poll
Source: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api

Related

How do I get the URL of a LinknedIn post from the URN or id?

I am able to post to LinkedIn via the API and I get the URN/id of the post returned, but I don't know how to get the actual URL of the post using the returned URN. I cannot find the information anywhere in the API documentation.
In case you have a share or ugcPost, the following URL is valid:
https://www.linkedin.com/embed/feed/update/<urn>
or, for embedded content:
https://www.linkedin.com/feed/update/<urn>
as example:
https://www.linkedin.com/feed/update/urn:li:share:<share-id>
or
https://www.linkedin.com/feed/update/urn:li:ugcPost:<ugc-post-id>
Working link from Test Organizations:
https://www.linkedin.com/feed/update/urn:li:share:6743008621090611200

Pinterest API get statistic for URL

I am trying to find a way to get statistic for the URL from Pinterest API.
Like facebook graph API: URL Object
Or linked in countserv endpoint:
https://www.linkedin.com/countserv/count/share?format=json&url=https://www.linkedin.com/pulse/breaking-5-major-boolean-syntax-changes-irina-shamaeva
I know it is possible because this site is returning the number of pins for given url:
https://www.sharedcount.com/#url=https%3A%2F%2Fwww.facebook.com%2F
Does anyone know how to get these data from Pinterest API?
There is no officially supported way to do this with the developer API. That said, the widgets use this for the count bubbles using this API
https://widgets.pinterest.com/v1/urls/count.json?url=<url>.
I wouldn't depend on it for anything important tho since it is unsupported and can change/be removed at any time.
You can get the number of pins calling this url
http://api.pinterest.com/v1/urls/count.json?callback=&url=http://stylehatch.co
It will return an object like this:
({"count": 0, "url": "http://stylehatch.co"})

Pagination on Soundcloud not working with favorites

I have a problem with the Soundcloud API when querying an authenticated user's tracks. I'm currently testing on iOS using NXOAuth2 to provide OAuth2 authentication. I am not using the now-deprecated Soundcloud iOS SDK.
If I make a GET request to https://api.soundcloud.com/me/tracks.json?limit=50&linked_partitioning=1, the returned JSON contains 50 tracks, and the string "https://api.soundcloud.com/me/tracks.json?limit=50&linked_partitioning=1&offset=50" for key "next_href". Making a GET request to this URL returns the next page of tracks. This works as expected.
If I make a GET request to https://api.soundcloud.com/me/favorites.json?limit=50&linked_partitioning=1, the returned JSON contains 50 tracks, and the string "https://api.soundcloud.com/me/favorites.json?before=1395763236&linked_partitioning=1&page_number=1&page_size=50" for key "next_href". Making a GET request to this URL returns a JSON with the same set of tracks as obtained with the original URL, and the same "next_href" string.
It looks like /me/tracks.json has not been updated with the new pagination style (still using offsets). However /me/favourites.json has, but does not work correctly for me. Can anyone else clarify similar behaviour? I am hoping there is something I have missed.
Many thanks in advance.

How to get a number of Google Plus +1 for a URL of post

I want to get a number of Google+ +1 for an URL of a article post.
For example I want to get a number of G+ like of Beautydea Magazine.
Is there a way to add my URL post for a specific URL of Google API? Such as Facebook or Twitter.
Here some examples of Facebook and Twitter with the same URL post.
Facebook:
https://graph.facebook.com/fql?q=SELECT%20total_count%20FROM%20link_stat%20WHERE%20url=%27http://www.beautydea.it/orly-baked-collezione-smalti-estate-2014/%27
Twitter:
http://urls.api.twitter.com/1/urls/count.json?url=http://www.beautydea.it/orly-baked-collezione-smalti-estate-2014/
Well if you are doing this on the server side, you could just load the url referred to by iframe of the button
https://apis.google.com/u/0/_/+1/fastbutton?usegapi=1&url=http%3A%2F%2Fwww.beautydea.it%2Forly-baked-collezione-smalti-estate-2014%2F
and read the count from the div with id "aggregateCount". You're out of luck on the client-side with that approach, since you can't load an external html page.
There is no supported API method for getting the +1 count of a URL. You can star the open feature request though.

Instagram API - Missing values from request /tags/xxx/media/recent

This is very strange. The request to /tags/chiara8anos/media/recent is working fine.
The problem is that the profile is public (http://instagram.com/chiaratroccoli) and i can fetch all images except this http://instagram.com/p/fYtRx0Qvit/.
The API is not returning this specific post but the hashtag, #chiara8anos, is correctly there as you can see. So the request /tags/chiara8anos/media/recent should have this.
I noticed that the image is not on amazon bucket as is use to be. This specific image is here: http://distilleryimage9.ak.instagram.com/4852dfbc339711e3817122000ab5bea8_8.jpg
If you try to use api-console (http://instagram.com/developer/api-console/) with this request https://api.instagram.com/v1/tags/chiara8anos/media/recent you won't be able to fetch this post even paginating.
Is it a bug? Some limitation from Instagram?
If you check the /users endpoint, that image is returned correctly and has standard_resolution: http://distilleryimage9.s3.amazonaws.com/4852dfbc339711e3817122000ab5bea8_8.jpg
which is the usual AmazonAWS URL This is the endpoint: https://api.instagram.com/v1/users/605729285/media/recent?access_token=
But you are right saying that the image is not returned using the /tags endpoint. It looks like an Instagram bug to me.