Thumbnails not showing up after creating a post via linkedin API call - linkedin

Thumbnails from external urls are not loading. However, the post inspector tool loads it just fine.
Page I used to perform some tests: https://www.cnbc.com/2022/10/28/more-than-40percent-of-us-households-will-owe-no-federal-income-tax-for-2022.html
Things I've tried so far:
Add an extra parameter at the end of the url in order to clear linkedin cache.
Post Inspector Tool
I did some research but I wasn't successful on finding a solution.
I created a post using different links like youtube and stackoverflow. Thumbnails didn't show up either.
I made sure each page has those required meta(open graph) tags that allows the crawler to retrieve information.
Here's an example of one of those API requests I've been calling to(I got this from the docs):
`
{
"author": "urn:li:person:{ID}",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "Learning more about LinkedIn by reading the LinkedIn Blog!"
},
"shareMediaCategory": "ARTICLE",
"media": [
{
"status": "READY",
"description": {
"text": "Official LinkedIn Blog - Your source for insights and information about LinkedIn."
},
"originalUrl": "https://www.cnbc.com/2022/10/28/more-than-40percent-of-us-households-will-owe-no-federal-income-tax-for-2022.html",
"title": {
"text": "Official LinkedIn Blog"
}
}
]
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
`

In the Share Media object, you're missing the media attribute. It accepts LinkedIn URN so you'll need to upload the image. Personally, I'm not using that attribute but thumbnails that accepts image url. I don't see it in the docs anymore so something might have been changed. At least it's still working for me and I haven't seen it deprecated in the changelog yet. Be careful with the image requirements as well. It accepts an image url with this signature
{
...,
"thumbnails": [{
"url": "https://image-url.com"
}]
}

Related

Frontity Woocommerce

I am new to the use of Frontity, but I do have a few questions, I hope this is the right place for it!.
Can someone explain me how to :
List products with Frontity.
Show variable products with Frontity
The use of REST API in Frontity.
Here is where you put in the API - its basically just your website URL plus wp-json.
"name": "#frontity/wp-source",
"state": {
"source": {
"api": "https://test.frontity.org/wp-json"
}

Using the LinkedIn API to update a profile header/background image

I am pretty new to the LinkedIn API. Does anyone know if there is a way to access a users profile header image/background image through the LinkedIn API? I have looked through the documentation and I cannot find it.
Also, if anyone has a good ASP.NET package that is built to work with LinkedIn so I don't have build the plumbing - would also love a recco.
Thanks.
JJO
linkedin
I found API documentation in https://learn.microsoft.com/en-us/linkedin/shared/integrations/people/profile-edit-api?context=linkedin/compliance/context#background-picture
Unfortunately, it's a complex process with 3 stes:
Register the background picture image to be uploaded.
1.1 POST https://api.linkedin.com/v2/assets?action=registerUpload
{
"registerUploadRequest": {
"recipes": [
"urn:li:digitalmediaRecipe:profile-originalbackground-image"
],
"owner": "urn:li:person:ABCDEF",
"serviceRelationships": []
}
}
1.2 POST https://api.linkedin.com/v2/assets?action=registerUpload
{
"registerUploadRequest": {
"recipes": [
"urn:li:digitalmediaRecipe:profile-displaybackground-image"
],
"owner": "urn:li:person:ABCDEF",
"serviceRelationships": []
}
}
Upload the background picture image to LinkedIn.
curl -i --upload-file /Users/peter/Desktop/superneatimage.png --header "Authorization: Bearer redacted" 'https://api.linkedin.com/mediaUpload/C5616AQEoeGkp7U5GEA/profile-uploadedBackgroundImage/0?ca=vector_profile&cn=uploads&m=AQIdKBw1WIgAWwAAAWhdlwvlhH13JEO0ZxBHb2VRuyAILbzD_VgJ-4UyLg&app=5480656&sync=0&v=beta&ut=1SpRkaq8G5DoA1'
Update the member's profile.
Use the asset from Step 1 to update the profile with the new background picture.
{
"patch": {
"backgroundPicture": {
"$set": {
"originalImage": "urn:li:digitalmediaAsset:C5604AQEMWf4Nl_mf2g",
"displayImage": "urn:li:digitalmediaAsset:C5616AQEoeGkp7U5GEA"
}
}
}
}

Retrieve thumbnails for Linkedin Video Post (ugcPost API)

I try to retrieve a thumbnails for a Video Post with the ugcPost api without any success.
I retrieve always an empty array for thumbnails.
Regarding the doc Retrieve UGC Posts, like the sample response:
"com.linkedin.ugc.ShareContent": {
"media": [
{
"media": "urn:li:digitalmediaAsset:123ABDEFHAG",
"status": "READY",
"thumbnails": []
}
],
Any idea about how to retrieve a thumbnails with some projection or using the digitalmediaAsset urn?
EDIT: I've already tried this https://stackoverflow.com/a/58401470/2270041 without any success
According to the docs this is not possible, simply stating
Video thumbnails are not retrievable.

Create UGC Post with Video Asset with LinkedIn V2 API

I'm trying to create a UGC post with video asset. I'm able to upload the video and get the media id. but when I'm trying to create the UGC post with the media id, I'm getting a permission error:
urn:li:developerApplication: does not have permission to create ugc posts
Although I am able to create UGC post with an image without any errors.
api url: https://api.linkedin.com/v2/ugcPosts
request budy:
{
"author":"urn:li:organization:",
"lifecycleState":"PUBLISHED",
"specificContent":{
"com.linkedin.ugc.ShareContent":{
"media":[
{
"description":
{
"attributes":[],
"text":"Testing video upload."
},
"media":"urn:li:digitalmediaAsset:",
"status":"READY",
"thumbnails":[],
"title":
{
"attributes":[],
"text":""
}
}
],
"shareCommentary":{
"attributes":[],
"text":"Testing video upload."
},
"shareMediaCategory":"VIDEO"
}
},
"targetAudience":{
"targetedEntities":[]
},
"visibility":{
"com.linkedin.ugc.MemberNetworkVisibility":"PUBLIC"
}
}
Apparently only a few / whitelisted apps can create video UGC posts: https://stackoverflow.com/a/54934631/7844946

App Search API Validation Tool displays "example.com is returning 469. Please check your url and try again."

I am online a fresh webpage for the purpose of universal links. I put the file in .well-known folder.
In the server log I can see that Applebot got 200 on "GET /.well-known/apple-app-site-association HTTP/1.1"
The only error displayed in the App Search API Validation Tool is:
"example.com is returning 469. Please check your url and try again."
I used another tool to check it - branch.io AASA Validator and it displays no errors.
Also make sure you don't have any robots.txt file in the root that disables Applebot
Robots.txt: allow only major SE
https://support.apple.com/en-us/HT204683
Looks like apple changed the format of AASA file. According to this official document, the old presentation
{
"applinks": {
"apps": [],
"details": [
{
"appID": "{PREFIX}.{BUNDLE_ID}",
"paths": ["*"]
}
]
}
}
Had already changed to:
{
"applinks": {
"details": [
{
"appIDs": [
"{PREFIX}.{BUNDLE_ID}"
],
"components": [
{
"/": "/*"
}
]
}
]
}
}
Considering backward compatibility, you can try writing in this format:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "{PREFIX}.{BUNDLE_ID}",
"paths": ["*"],
"appIDs": [
"{PREFIX}.{BUNDLE_ID}"
],
"components": [
{
"/": "/*"
}
]
}
]
}
}
This works for me, hope it helps.
What worked for me was adding image metadata on top of title and description metadata. I also added Touch icons, but I do not think it caused the issue since it works fine on another website I have without it.
Required metadata seems to be: Title, description and Image (og:image was the missing one in my case)
For metadata check out: The Open Graph Protocol
For icons check out: Developer Apple - Configuring Web Applications

Resources