While posting a share, linkedInDistributionTarget is mandatory field which needs to be included in the body of post request. Even though it is empty Why do we need to include in the body.
If i am not using that key,Following error is thrown
{
"owner": "urn:li:organization:xxxxxx",
"text": {
"text": "Hii Kaushik from builder"
}
}
Error:
{
"message": "com.linkedin.restli.client.RestLiResponseException: Response status 400, serviceErrorMessage: com.linkedin.publishing.util.common.ResponseException: Company owned UGCs can only have PUBLIC or LOGGED_IN MemberNetworkVisibility.",
"status": 400
}
From their docs:
"Omitting distribution.linkedInDistributionTarget during share creation creates a dark or hidden share which is not shown publicly on LinkedIn.com. Specify the field as an empty object to make the share publicly viewable."
Source:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.