Search code examples
linkedin-api

LinkedIn cannot display share image from Amazon S3


I have an issue with "submitted-image-url" option when post a share using LinkedIn API. All my images stored on Amazon S3. For example "https://s3.amazonaws.com/news-img/client_619/619_1424690228983-DarthVaderSEOToaster2.jpg". When I try to use different source for image, from whatever another website, it works well.

Could you please help me? Why images from Amazon S3 cannot be fetched by LinkedIn? Do I need add some exceptions in my S3 bucket?

One more, with other social networks like Twitter and Facebook everything works fine.

Thank you, Oleg


Solution

  • Tricky http headers... Need to set correct 'content-type' header when upload images to S3 bucket. E.g. 'Content-Type': image/' + imageExtension. Solved!