Get main picture URL of LinkedIn user - linkedin

When requesting Basic Profile Fields for a specific user we get back the following:
picture-url, a URL for a square profile picture with a size of
100x100 pixels.
picture-urls, a list containing URLs for the original uploaded
picture.
What I need is the user's picture in square size and in a higher quality.
I know that the user's main picture (the one that is available on his/her profile page under https://www.linkedin.com/in/[user_id]/) is the size of 200x200 pixels, which is much better.
How can I access this picture URL through the API?
Remark: If I try to just generate this URL I get Access Denied error.

The LinkedIn API does not have any documented way to access the different sizes of the generated images. You can use picture-urls::(original) field to get the original uploaded picture URL and then scale it as you like. The original uploaded image can be even larger than 200x200 that the LinkedIn profile uses.
https://developer.linkedin.com/docs/fields/basic-profile
picture-urls::(original) A URL to the member's original unformatted
profile picture. This image is usually larger than the picture-url
value above.
API Call
GET: /v1/people/~:(id,first-name,last-name,picture-url,picture-urls::(original))
Result
{
"firstName": "Christos",
"id": "...",
"lastName": "Litras",
"pictureUrl": "https://media.licdn.com/dms/image/C5603AQHcTGe3GOQviw/profile-displayphoto-shrink_100_100/0?e=1528894800&v=beta&t=JzgIhDOm-xGxIEuQP1jy3sFHRAeN5pk5skHhXm9s3wM",
"pictureUrls": {
"_total": 1,
"values": [
"https://media.licdn.com/dms/image/C5600AQG-fzvmQVCLsg/profile-originalphoto-shrink_900_1200/0?e=1528894800&v=beta&t=TrtntJgtAHeolrPeteffiq_Ixg-JecaAvutQioy0c8A"
]
}
}

Related

How to make wordpress post after API request

I've made a custom WordPress post and it has many fields to input.
Also, I've made a custom plugin that calls the API from the other site and creates posts using the API results.
The other things are working well.
But in my custom posts, there's a gallery to show the thumbnail images and I can get the image urls from the API.
"Images": [
{
"Priority": "0",
"Caption": "",
"Uri": "https://images.boatsgroup.com/images/1/68/46/7376846_20200225094022955_1_XLARGE.jpg",
"LastModifiedDateTime": "2020-02-25T09:49:53-08:00"
}]
enter image description here
So I've added the images manually to check where the images are saved in the database.
But I am not sure.
I want to know:
Where can I find the saved data for the gallery in the database?
How to create posts using the image URLs from API results automatically?
If anybody has experience in this kind of problem, help me, please.

How to get Firebase Dynamic Link URL social metadata itself

Say I have original URL: https://flutree.web.app/NWfLo\
And I shorten it using Firebase Dynamic Link, and set with Social Metadata (image, title, desc), it becomes new URL : https://flut.page.link/hcpa
Now I want to have a Link Preview functionality, I'm using simple_url_preview package. Basically, the package did a GET request of the new URL and parse the og(s) property from the body.
The problem is, it returns the metadata of the original URL, as depicted below:
Behavior that I want to achieve is as below (Example from Telegram's Link Preview, same behavior observed on other major platform ie Twitter, WhatsApp etc):
So, how can I get the metadata of the Firebase Dynamic link itself and not the original/target URL?

WooCommerce API and product image upload

I'm using the Google Books API to populate a WooCommerce database but I can't upload the images because I get this error:
{
"code": "woocommerce_product_invalid_image_id",
"message": "#593 is an invalid image ID.",
"data": {
"status": 400
}
}
WebP image link:
http://books.google.com/books/content?id=lYpxPQAACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api
I have found a solution that uses another API and converts the WebP image to a JPG image so that the API can upload it without problems, but for other reasons I don't want to use it.
Given the fact that with some plugin WooCommerce can easily handle WebP images, my question is:
Is there any way to not require uploading the image and instead just link to the WebP image?

Linkedin - How can i get big profile picture

I am trying to harvest some profile photo's
which is no problem
after authentication an array is returned and i can use the value of 'pictureUrl' which contains the location of the small profile photo.
What i can't seem to find in the documentation is the url for the larger profile photo (which is shown after clicking on the small photo of a person's page)
Does anybody know how/where to get this bigger picture?
thanks
You can get the original profile picture from here:
https://api.linkedin.com/v1/people/~/picture-urls::(original)?oauth2_access_token=YOUR_ACCESS_TOKEN
Be careful about the special characters into the url (::())
Hope it helps.
function getLinkedInProfilePhoto() {
IN.API.Raw("/people/~/picture-urls::(original)").result(function(result, metadata)
{
$('#image').attr("src", result.values);
});
}

How to get item ID under "INTERESTS"

I am developing an application to get images from the specific Facebook page registered under "INTERESTS" node displayed in the left menu area of the top page.
So I want to get the ID of the menu item under "INTERESTS".
I can find a way to get "Interests" of user's profile, but it is different from "INTERESTS".
Please someone let me know how to get it.
Thanks,
I tested it with a new list of my own. If I copy the link address and query the Graph API for the id it contains, I get something like this,
{
"id": "…",
"name": "test",
"list_type": "user_created",
"type": "friendlist"
}
But I can not see it under /me/friendlists, no luck finding a connection somewhere using FQL either. Can’t tell if it’s not showing up because the type is "user_created" (maybe?) …

Resources