Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owner entity type person is not supported #5

Closed
mkriegs opened this issue Dec 10, 2023 · 12 comments
Closed

Owner entity type person is not supported #5

mkriegs opened this issue Dec 10, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@mkriegs
Copy link

mkriegs commented Dec 10, 2023

Hey, can you help here ?

owner: "urn:li:person:" + ownerId,

Looks like it should be like this: "author": "urn:li:person:8675309"
https://learn.microsoft.com/de-de/linkedin/consumer/integrations/self-serve/share-on-linkedin#creating-a-share-on-linkedin

best regards Michael

{
status: 400,
headers: {
'x-li-responseorigin': 'RGW',
'content-type': 'application/json',
'x-restli-error-response': 'true',
'x-restli-gateway-error': 'false',
'x-restli-protocol-version': '2.0.0',
'content-length': '68',
date: 'Sun, 10 Dec 2023 12:26:57 GMT',
'x-li-fabric': 'prod-ltx1',
'x-li-source-fabric': 'prod-lva1',
'x-li-pop': 'prod-lva1-x',
'x-li-proto': 'http/1.1',
'x-li-uuid': 'AAYMJu7uDegAHiAVXD7aaQ==',
'set-cookie': [
'bcookie=""; domain=.linkedin.com; Path=/; Secure; Expires=Mon, 09-Dec-2024 12:26:57 GMT; SameSite=None',
'lidc="b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1061:x=1:i=1702211217:t=1702286985:v=2:sig="'
],
'x-li-route-key': '"b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1061:x=1:i=1702211217:t=1702286985:v=2:sig="'
},
body: '{"message":"Owner entity type person is not supported","status":400}'
}
Error: Failed to post on LinkedIn

@Arisamiga Arisamiga added the bug Something isn't working label Dec 10, 2023
@Arisamiga Arisamiga self-assigned this Dec 10, 2023
@Arisamiga
Copy link
Owner

Hello, @mkriegs. Thanks for making an issue!

What version of the action are you using?
If you are using the master branch can you try to use a release tag like uses: Arisamiga/Linkedin-RSS@1.2.1.

@mkriegs
Copy link
Author

mkriegs commented Dec 11, 2023

Hello @Arisamiga ,

same result with master and 1.2.1
how you deside if the post ist with or without pic ? from api doc it looks like you have to use diffrent calls.

best regards

@Arisamiga
Copy link
Owner

Arisamiga commented Dec 11, 2023

Hello @Arisamiga ,

same result with master and 1.2.1 how you deside if the post ist with or without pic ? from api doc it looks like you have to use diffrent calls.

best regards

Hello @mkriegs The Image gets put inside the embed of the post and the specific API I am currently using allows for external images.

I am using the Share API https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api which appears to be working. 🤔

Are you trying to post blog posts on an organization account or have you turned on creator mode on your LinkedIn Profile?

Can you please try to use uses: Arisamiga/Linkedin-RSS@dev-2 without any embed image input (It uses a different API which might work but Images are not being registered correctly yet.)

Thank you!

@mkriegs
Copy link
Author

mkriegs commented Dec 11, 2023

Hello @Arisamiga
its stupid linkedin Profile, no features :D please guide me, i may do somethink wrong.
i want to post from my blog my last post to linkedin. ( i hope it checks that i post only ones the last post^^)
https://mkriegs.info/feed.xml

result with dev-2:
{
status: 403,
headers: {
'content-type': 'application/json',
'x-restli-error-response': 'true',
'x-restli-protocol-version': '2.0.0',
date: 'Mon, 11 Dec 2023 19:29:43 GMT',
'x-li-fabric': 'prod-ltx1',
'transfer-encoding': 'chunked',
'x-li-source-fabric': 'prod-lor1',
'x-li-pop': 'prod-lor1-x',
'x-li-proto': 'http/1.1',
'x-li-uuid': 'AAYMQPS1s5nuuALvQjS3Cw==',
'set-cookie': [
'bcookie="v=2&bcb86043-f0ff-4f15-8808-daed2226172a"; domain=.linkedin.com; Path=/; Secure; Expires=Tue, 10-Dec-2024 19:29:43 GMT; SameSite=None',
'lidc="b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig="'
],
'x-li-route-key': '"b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig="'
},
body: '{"status":403}'
}
{
status: 403,
headers: {
'content-type': 'application/json',
'x-restli-error-response': 'true',
'x-restli-protocol-version': '2.0.0',
date: 'Mon, 11 Dec 2023 19:29:43 GMT',
'x-li-fabric': 'prod-ltx1',
'transfer-encoding': 'chunked',
'x-li-source-fabric': 'prod-lor1',
'x-li-pop': 'prod-lor1-x',
'x-li-proto': 'http/1.1',
'x-li-uuid': 'AAYMQPS1s5nuuALvQjS3Cw==',
'set-cookie': [
'bcookie="v=2&bcb86043-f0ff-4f15-8808-daed2226172a"; domain=.linkedin.com; Path=/; Secure; Expires=Tue, 10-Dec-2024 19:29:43 GMT; SameSite=None',
'lidc="b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig=AQFDO39f9B4gpsgRbCwEimzF9d1ApiGl"'
],
'x-li-route-key': '"b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig=AQFDO39f9B4gpsgRbCwEimzF9d1ApiGl"'
},
body: '{"status":403}'
}
Error: Failed to post on LinkedIn

Select "Create a new access token" and click "Create Token" Select your app and make sure you have the r_liteprofile, w_member_social scopes selected. Where to finde the r_liteprofile?
image

best regards

@Arisamiga
Copy link
Owner

Arisamiga commented Dec 11, 2023

Hello @Arisamiga its stupid linkedin Profile, no features :D please guide me, i may do somethink wrong. i want to post from my blog my last post to linkedin. ( i hope it checks that i post only ones the last post^^) https://mkriegs.info/feed.xml

result with dev-2: { status: 403, headers: { 'content-type': 'application/json', 'x-restli-error-response': 'true', 'x-restli-protocol-version': '2.0.0', date: 'Mon, 11 Dec 2023 19:29:43 GMT', 'x-li-fabric': 'prod-ltx1', 'transfer-encoding': 'chunked', 'x-li-source-fabric': 'prod-lor1', 'x-li-pop': 'prod-lor1-x', 'x-li-proto': 'http/1.1', 'x-li-uuid': 'AAYMQPS1s5nuuALvQjS3Cw==', 'set-cookie': [ 'bcookie="v=2&bcb86043-f0ff-4f15-8808-daed2226172a"; domain=.linkedin.com; Path=/; Secure; Expires=Tue, 10-Dec-2024 19:29:43 GMT; SameSite=None', 'lidc="b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig="' ], 'x-li-route-key': '"b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig="' }, body: '{"status":403}' } { status: 403, headers: { 'content-type': 'application/json', 'x-restli-error-response': 'true', 'x-restli-protocol-version': '2.0.0', date: 'Mon, 11 Dec 2023 19:29:43 GMT', 'x-li-fabric': 'prod-ltx1', 'transfer-encoding': 'chunked', 'x-li-source-fabric': 'prod-lor1', 'x-li-pop': 'prod-lor1-x', 'x-li-proto': 'http/1.1', 'x-li-uuid': 'AAYMQPS1s5nuuALvQjS3Cw==', 'set-cookie': [ 'bcookie="v=2&bcb86043-f0ff-4f15-8808-daed2226172a"; domain=.linkedin.com; Path=/; Secure; Expires=Tue, 10-Dec-2024 19:29:43 GMT; SameSite=None', 'lidc="b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig=AQFDO39f9B4gpsgRbCwEimzF9d1ApiGl"' ], 'x-li-route-key': '"b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1063:x=1:i=1702322983:t=1702408366:v=2:sig=AQFDO39f9B4gpsgRbCwEimzF9d1ApiGl"' }, body: '{"status":403}' } Error: Failed to post on LinkedIn

Select "Create a new access token" and click "Create Token" Select your app and make sure you have the r_liteprofile, w_member_social scopes selected. Where to finde the r_liteprofile? image

best regards

Hello @mkriegs

Seems like LinkedIn changed and removed the product used for the API.

So the application cannot get the actual user ID.

I made a commit now f6e9cd6 which should fix it. Can you please try to use the master branch and see if it works? Make sure to use "profile and openid as well as w_member_social" scopes

Thanks!

@mkriegs
Copy link
Author

mkriegs commented Dec 12, 2023

Hey @Arisamiga
thanks for the update.

didnt change anythink, changed back to @master

{
status: 400,
headers: {
'x-li-responseorigin': 'RGW',
'content-type': 'application/json',
'x-restli-error-response': 'true',
'x-restli-gateway-error': 'false',
'x-restli-protocol-version': '2.0.0',
'content-length': '68',
date: 'Tue, 12 Dec 2023 06:09:37 GMT',
'x-li-fabric': 'prod-ltx1',
'x-li-source-fabric': 'prod-lva1',
'report-to': '{"group":"network-errors","max_age":2592000,"endpoints":[{"url":"https://www.linkedin.com/li/rep"}],"include_subdomains":true}',
nel: '{"report_to":"network-errors","max_age":1296000,"success_fraction":0.00066,"failure_fraction":1,"include_subdomains":true}',
'x-li-pop': 'prod-lva1-x',
'x-li-proto': 'http/1.1',
'x-li-uuid': 'AAYMSeUrjkQ9G5+DajRD0w==',
'set-cookie': [
'bcookie="v=2&d9e922e0-cb97-4eea-87f5-b86bf009ba79"; domain=.linkedin.com; Path=/; Secure; Expires=Wed, 11-Dec-2024 06:09:37 GMT; SameSite=None',
'lidc="b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1065:x=1:i=1702361377:t=1702447544:v=2:sig="'
],
'x-li-route-key': '"b=TB32:s=T:r=T:a=T:p=T:g=4690:u=1065:x=1:i=1702361377:t=1702447544:v=2:sig="'
},
body: '{"message":"Owner entity type person is not supported","status":400}'
}
Error: Failed to post on LinkedIn

@Arisamiga
Copy link
Owner

Arisamiga commented Dec 12, 2023

Hello @mkriegs

Sorry for that. The release did not build as expected. Can you please try to run the action again?

Make sure to also have the scopes "profile and openid as well as w_member_social" selected

Thanks :D

@mkriegs
Copy link
Author

mkriegs commented Dec 13, 2023

Hey, @Arisamiga

it worked out! post is on linkedin!
can we iprov the post a bit ?:D so add more out of the rss feed ?
like category as #${category} or more Content ?

best regards

@mkriegs
Copy link
Author

mkriegs commented Dec 14, 2023

Hey @Arisamiga

if i do cron each 1 hour i get all the time this error. Who to resolv this ?
i found that this guy stores the last post in repo.
https://github.com/p4p1/linkedin-marketing-workflow

body: '{"errorDetailType":"com.linkedin.common.error.BadRequest","message":"com.linkedin.content.common.exception.BadRequestResponseException: Content is a duplicate of urn:li:share:7141138937766391808","errorDetails":{"inputErrors":[{"description":"Duplicate post is detected","input":{},"code":"DUPLICATE_POST"}]},"status":422}'
}
Error: Failed to post on LinkedIn

best regards Michael :)

@Arisamiga
Copy link
Owner

Hello @mkriegs

Hey, @Arisamiga

it worked out! post is on linkedin! can we iprov the post a bit ?:D so add more out of the rss feed ? like category as #${category} or more Content ?

best regards

I would suggest Forking the Repository and adding fields that you want so you can personalize it for your own RSS thread!
(If you want I can guide you through that process)
I cannot add fields such as "Category" as that might not be in someone else's RSS thread.

Hey @Arisamiga

if i do cron each 1 hour i get all the time this error. Who to resolv this ? i found that this guy stores the last post in repo. https://github.com/p4p1/linkedin-marketing-workflow

body: '{"errorDetailType":"com.linkedin.common.error.BadRequest","message":"com.linkedin.content.common.exception.BadRequestResponseException: Content is a duplicate of urn:li:share:7141138937766391808","errorDetails":{"inputErrors":[{"description":"Duplicate post is detected","input":{},"code":"DUPLICATE_POST"}]},"status":422}' } Error: Failed to post on LinkedIn

best regards Michael :)

This happens because you have uploaded the same post before. I am thinking of ways to mitigate this and adding a file might be a good way. I will create a issue with this idea!

Also let me know If you want me to close this issue sense it has been resolved.

Thank you.

@Arisamiga
Copy link
Owner

I will be closing this issue as it has been resolved. If you have any further problems don't hesitate to reopen it.

@mkriegs
Copy link
Author

mkriegs commented Dec 18, 2023

Hey @Arisamiga ,

sorry didnt find time to respond to you. thanks for the help and bug release, aswell as new feature.
regarding the fork, yeah keep it generic, i dont want to customize my action. so leaf it like it is.

best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants