问题
I am using following endpoint to fetch posts
https://api.linkedin.com/v2/ugcPosts?q=authors&authors[0]=urn:li:organization:XXXX&count=100&start=0
"media": [{
"recipes": [
"urn:li:digitalmediaProcessedAsset:(urn:li:digitalmediaAsset:XXXXXXXXXX,urn:li:digitalmediaRecipe:feedshare-video-captions-thumbnails)"
],
"media": "urn:li:digitalmediaAsset:XXXXXXXXXX",
"thumbnails": [],
"status": "READY"
}]
I could see only digitalmedia Asset, But couldn't find original Url like sharable url like
https://dms.licdn.com/playback/C5105AQGCJKQiUe3pmw/8f26be64328644c090703fdc3afd05a8/feedshare-mp4_3300-captions-thumbnails/1507940147251-drlcss?e=1571133600&v=beta&t=RgRX9RM_Z50wt4cwqEHQ79vY6NU-KNcKVPFbEIftqAc
Note : For image, we are getting original Url
https://media.licdn.com/dms/image/C5122AQHvWYVXpP2Few/feedshare-shrink_1280/0?e=1573689600&v=beta&t=gLeLjTO5OlyF-F0RESk9YdSyqMggXLNmkWSUOqldFXw
回答1:
Using projection helped to solve this issue
https://api.linkedin.com/v2/ugcPosts?q=authors&authors[0]=urn:li:organization:XXXXX&count=100&projection=(paging,elements*(name,localizedName,vanityName,created(actor~(localizedFirstName, localizedLastName)),lastModified(actor~(localizedFirstName, localizedLastName)),specificContent(com.linkedin.ugc.ShareContent(shareMediaCategory,shareCommentary,media(*(media~:playableStreams,originalUrl,description,title))))))
来源:https://stackoverflow.com/questions/58374194/linkedin-api-ugcpost-video-url-is-missing