How to get large LinkedIn Image Share Format

2019-01-23 21:19发布

I am using linkedin api to share post on linkedin which look like this:

enter image description here

How to get make post like this through api: enter image description here

I am trying all combination of post body but am not able to post content like above.

{   
    "comment": "Check out developer.linkedin.com!",
    "content": {
        "title": "LinkedIn Developers Resources",
        "description": "Leverage LinkedIn's APIs to maximize engagement",
        "submitted-url": "https://developer.linkedin.com",  
        "submitted-image-url": "https://example.com/logo.png"
        },
        "visibility": {
            "code": "anyone"
        }
}

2条回答
男人必须洒脱
2楼-- · 2019-01-23 21:49

You can pass " " as the title and you will get a card that seems to be an picture.

查看更多
一纸荒年 Trace。
3楼-- · 2019-01-23 22:00

If someone looking for a solution for this, The trick that I have found it.

so basically the solution is to pass the image url in the submitted-url field and don't pass the submitted-image-url parameter.

so instead of passing this:

{   
    "comment": "Check out developer.linkedin.com!",
    "content": {
        "title": "LinkedIn Developers Resources",
        "description": "Leverage LinkedIn's APIs to maximize engagement",
        "submitted-url": "https://developer.linkedin.com",  
        "submitted-image-url": "https://example.com/logo.png"
    },
    "visibility": {
        "code": "anyone"
    }
}

which will give:enter image description here

you pass the following:

{   
    "comment": "Check out developer.linkedin.com!",
    "content": {
        "title": "LinkedIn Developers Resources",
        "submitted-url": "https://www.example.com/someimage.jpg"
    },
    "visibility": {
        "code": "anyone"
    }
}

which will give this:

enter image description here

Note that I don't pass submitted-image-url and description in the json. Description does not show on the post, so there's no point of passing anything in that field.

查看更多
登录 后发表回答