在linkedin页面中发布共享时,解析的URL不起作用

时间:2019-04-24 19:14:31

标签: java spring rest linkedin linkedin-api

我正在尝试发布具有实体位置和内容实体中已解决Url的共享,即使我将resolveUrl指向图像,也没有考虑该图像,而是从实体位置获取“ og:image”。我看不到有任何使用resolveUrl的信息。

建议如何使用resolveUrl。具有自定义网址的图片。

身体:

{
    "owner": "urn:li:organization:xxxxxxx",
    "distribution": {
        "linkedInDistributionTarget": {}
    },
    "content": {
        "contentEntities": [{
            "entityLocation": "https://www.cricbuzz.com/cricket-news/107673/ipl-2019-rishabh-pant-shikhar-dhawan-propel-delhi-capitals-to-the-top-rr-vs-dc-rajasthan-royals",
            "thumbnail": [{
                "resolvedUrl": "https://www.cricbuzz.com/a/img/v1/595x396/i1/c168531/watson-led-csks-chase-of-176.jpg"
            }]
        }],
        "description": "Description of attachment",
        "title": "Title of the attachment"
    },
    "text": {
        "text": "Hii Kaushik from builder"
    }
}

1 个答案:

答案 0 :(得分:1)

你好,我认为这可能是由于拼写错误造成的:应该是“缩略图”而不是“缩略图”,看看它是否有效。

链接:https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api#post-shares

{
    "owner": "urn:li:organization:xxxxxxx",
    "distribution": {
        "linkedInDistributionTarget": {}
    },
    "content": {
        "contentEntities": [{
            "entityLocation": "https://www.cricbuzz.com/cricket-news/107673/ipl-2019-rishabh-pant-shikhar-dhawan-propel-delhi-capitals-to-the-top-rr-vs-dc-rajasthan-royals",
            "thumbnails": [{
                "resolvedUrl": "https://www.cricbuzz.com/a/img/v1/595x396/i1/c168531/watson-led-csks-chase-of-176.jpg"
            }]
        }],
        "description": "Description of attachment",
        "title": "Title of the attachment"
    },
    "text": {
        "text": "Hii Kaushik from builder"
    }
}

希望这会有所帮助。