3
votes

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

2

2 Answers

2
votes

When you are uploading file on S3 set ContentType: 'STRING_VALUE' field in params like

var params={ Bucket: "my-bucket", Key: 'test.png', ContentType: 'image/png', Body: fileStreamObject }

1
votes

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