You are here:  » Facebook preview doesn't work

Active Forum Topics


Facebook preview doesn't work

Submitted by Tobix on Tue, 2020-11-24 21:31 in

I am creating a product mapping. I realized that if I share on Facebook it gives me an error and the video preview does not work. How can I addressed?

Submitted by support on Wed, 2020-11-25 08:09

Hi Tobix,

What code did you add to share to Facebook and what is the error you are getting when attempting to share?

Thanks,
David.
--
PriceTapestry.com

Submitted by Tobix on Wed, 2020-11-25 16:46

I simply copy the site link to facebook and it gives me wordpress error instead of the preview. This in virtual mode.

If, on the other hand, I create an article and insert the shortcodes in "imported" mode, everything is ok.

this however involves double work. Group them then map them and create an article for each one. Seo is a great thing but I don't know what to do .. advice?

Submitted by support on Thu, 2020-11-26 09:01

Hi Tobix,

I wonder if this is a canonical issue... If you view the source of the page that you are submitting to Facebook, do you see a canonical tag that is different to the actual URL of the page, possibly the URL of the container permalink page e.g. /shopping/?

Cheers,
David.
--
PriceTapestry.com

Submitted by Tobix on Thu, 2020-11-26 17:29

If you want to try it yourself ... maybe you understand the problem better. Why shouldn't I group the products and then create the articles via shortcode.
Not bad even if there is a lot of work. :)

{link saved}

Submitted by support on Fri, 2020-11-27 08:59

Hello Tobix,

It does look like a canonical issue - there is a canonical link in the <head> section of the page that points to your home page but with URL parameters that causes WordPress to generate an error. This may well also be impacting on search engine coverage.

The plugin doesn't generate or override a canonical at all, and it looks like by default WordPress generates a canonical equivalent to the page URL so you might want to check whether you have any other plugins installed (such as for SEO) that have options regarding the canonical, or alternatively it may a theme setting.

If there's nothing obviously causing the issue, you could try editing the PriceTapestry.org plugin file pto.php and inserting the following code right at the end, immediately before the closing PHP tag:

function pto_get_canonical_url($canonical_url)
{
  global $pto_module;
  if ($pto_module)
  {
    $canonical_url = "http".(isset($_SERVER["HTTPS"])?"s":"")."://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
  }
  return $canonical_url;
}
add_filter('get_canonical_url','pto_get_canonical_url',10);

Giving the filter a priority of 10 should override any other plugin affected canonical. Once uploaded, view your product page again, use the View > Source function in your browser and search for "canonical", and check that the link shown is now equivalent to the page URL...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Tobix on Sat, 2020-11-28 05:14

unfortunately it doesn't work. i also disabled all plugins.

Submitted by support on Sat, 2020-11-28 08:28

Hello Tobix,

I've got your example page link saved; would it be possible to go back to all plugins (except PriceTapestry.org for WordPress) disabled and then let me know when that is the case and I'll study the page output again...

Thanks,
David.
--
PriceTapestry.com