Facebook javascript sdk api shares a link and has a 154 image on the wall

I need to share a facebook link and have a larger image on the wall. I am sharing the link as follows:

FB.ui( { method : 'feed', name: 'the name whatever', caption: 'some caption', description: 'description', link: 'http://mysite.com/some_page', picture: photo_url }, function (response) { ... } ); 

The image is larger than 154x154, I tried the size of 180x180 (I read somewhere in the documents, this required 180x180), but in any case it ends in 90x90 on the wall :(.

If I remove the image parameter, the og: image meta tag will be captured, but it is still 90x90 pixels! If I send the link myself, I see that it is missing the correct size - therefore, when I send to the wall myself, it posts an image of 154x154 size, but how can I do the same to publish it via the facebook api?

I tried it the same way - the same thing works, please help :(

  FB.api('/me/feed', 'post', { link : 'http://whatever_mysite.com/some_page', picture : photo_url }, function (response) { ... } ); 

This is when sent manually, a direct link to the site (image taken from meta tags): enter image description here

This is when used via api (original: http://www.dandybooksellers.com/acatalog/TheoryTest.jpg ): enter image description here

If the "picture" argument is not specified, it places the "TEST CORRECTION" from the meta tags, but still with a size of 90x90

+4
source share
1 answer

The URL of the image attached to this post. The image must be at least 50 pixels by 50 pixels (although a minimum of 200 pixels by 200 pixels is preferred) and has a maximum aspect ratio of 3: 1

See http://developers.facebook.com/docs/reference/dialogs/feed/ for more details.

+1
source

Source: https://habr.com/ru/post/1468969/


All Articles