Why does Facebook sharer.php correctly display some of my thumbnails, but not others?

Ok, this is my first SO question, so be careful. Do your best to be thorough. :)

We want users to be able to exchange URLs for ordering photos of their children on our website. We are currently not interested in implementing Open Graph on our website. We are not trying to track this data at this time, and it works more than I have time. Therefore, I chose the fastest route: sharer.php link.

I understand that FB sharer.php is deprecated in favor of the og: tags, but I don’t see any references to https://developers.facebook.com/docs/reference/plugins/share-links/ , which was updated three weeks ago, therefore, it obviously should work.

I followed the instructions on these blogs to set up links:

http://ar.zu.my/how-to-really-customize-the-deprecated-facebook-sharer-dot-php/

http://www.therykers.net/?p=37

However, we only get thumbnails for displaying correctly in the FB Share dialog box when using our subdomain of our site, although the source code for our sharer.php link is identical in all cases (except for the image / name of the child element, the subdomain of the site and the name of the photo studio )

This source code (demo site) displays the image correctly:

 <a href="https://www.facebook.com/sharer.php? s=100 &p[url]=https://demo.mysmilecentral.com/public/show?link_code=funankizwd &p[images][0]=http://assests0_bop_heroku_com.s3.amazonaws.com/images/sp00/sp00-001-1/0106_022_0028.jpg &p[title]=Order%20Pictures%20of%20CASEY%20at%20Sample Studio's%20MySmileCentral! &p[summary]=View%20images%20and/or%20order%20pictures%20of%20CASEY." target="_blank"> <img src="https://assests0_bop_heroku_com.s3.amazonaws.com/images/fb-share-btn2.png" style="margin-top: -35px; margin-right: 126px; float: right" /> </a> 

But this (live site):

 <a href="https://www.facebook.com/sharer.php? s=100 &p[url]=https://rowlandphoto.mysmilecentral.com/public/show?link_code=2cols21uogpx &p[images][0]=http://assests0_bop_heroku_com.s3.amazonaws.com/images/bj20/bj20-bb2013-1/1448_img_0128.jpg &p[title]=Order%20Pictures%20of%20Gabrielle%20at%20Rowland Studio's%20MySmileCentral! &p[summary]=View%20images%20and/or%20order%20pictures%20of%20Gabrielle." target="_blank"> <img src="https://assests0_bop_heroku_com.s3.amazonaws.com/images/fb-share-btn2.png" style="margin-top: -35px; margin-right: 126px; float: right" /> </a> 

Both images comply with FB Share size requirements and are viewable.

I spent several hours trying to find the answer (Googling, search here) and did not come up with a logical reason for this.

+4
source share
1 answer

If you open your web inspector, you will understand that https://www.facebook.com/sharer.php deprecated redirects to https://www.facebook.com/sharer/sharer.php , which has only one supported the u parameter for a common URL, which depends on the Open Graph metadata (which you choose not to use).

The p array (p [url], etc.) is not supported in the new Facebook Share dialog box. Using legacy features, you should expect unstable behavior or no results at all. Nothing more is said about this.

+4
source

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


All Articles