java - 解决了在 linkedin 页面中发布共享时网址不起作用的问题

标签 java spring rest linkedin-api

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

建议如何使用resolvedUrl ie。带有自定义 url 的图像。

正文:

{
    "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"
    }
}

最佳答案

您好,我认为这可能是因为拼写错误:应该是“缩略图”而不是“缩略图”,看看它是否有效。

链接:https://learn.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"
    }
}

希望这有帮助。

关于java - 解决了在 linkedin 页面中发布共享时网址不起作用的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55837093/

相关文章:

java - 如何更高效地注释多个Stanford CoreNLP CoreDocuments?

java - Jarsigner 错误 : java. lang.RuntimeException

java - 如何从我的类方法启动和停止 quartz 调度程序?春节安排

java - 执行三四天后,通过 spring 注入(inject) "While True"循环的线程停止

Spring boot Autowired在配置类中不起作用

java - 使用 Spring RestTemplate 将 JSONP 转换为 JSON

java - 打开项目文件时的 Eclipse PHP SIGSEGV

java - Gracenote API : GnAlbum (method of Gracenote android GNSDK)

caching - REST 资源设计 : Embedding related data VS linking to it?

c# - 一个 C# 数据结构,用于保存具有不同于 "key"和 "value"的标识符的键值对