How do I set up a facebook redirect?

I made 4 landing pages on the website http://www.getyogi.fr/ and a PHP script randomized different landing pages.

But my problem is to capture the open facebook graphics. It returns: Failed to execute redirection path - using data from http://www.getyogi.fr/lp1/ because there was an error following the redirection path.

Here is my open HTML graph:

<meta property="og:title" content="Le yoga en ligne">
<meta property="og:site_name" content="GET YOGi">
<meta property="og:url" content="http://www.getyogi.fr/">
<meta property="og:description" content="GET YOGi est un site pour pratiquer le yoga en ligne et prendre soin de vous où et quand vous voulez. Depuis votre mobile, votre tablette ou votre ordinateur, des cours HD disponible 24H/24, 7 jours /7.">
<meta property="fb:app_id" content="677363099034751">
<meta property="og:type" content="website">
<meta property="og:image" content="http://www.getyogi.fr/lp1/img/yoga1.jpg">

      

Can anyone help me?

+3


source to share


2 answers


The problem here has to do with the url you are using in yours og:url

. You say you have a PHP snippet that randomizes the landing page and then redirects the user to that page. Here's what's going on:

There are several options you can do here:



Option 1: The landing pages og:url

will have the URL of the landing page that the user lands on.

Option 2: on the main url, your random PHP script ignores requests from a Facebook crawler that has a user agentfacebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)

+3


source


I also had this error message, but for a completely different reason. I resolved the error by adding OpenGraph to the language attributes (in the header)

For example:



<html xmlns="https://www.w3.org/1999/xhtml" xmlns:og="https://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">

      

0


source