share on facebook: to use a different url in the open graph tags

2.2k Views Asked by At

I have a superheroes quiz game at this address: mysite/index.html, the quiz has 2 possible results mysite/result1.html and mysite/result2.html. Each result page has the open graph tags as:

<meta property="og:type" content="website" />
<meta property="og:title" content="Great you are Superman" />
<meta property="og:description" content="Description of Superman" />
<meta property="og:url" content="mysite/result1.html" />
<meta property="og:image" content="image.jpg" />

All works fine but in this way I'm sharing the result page url instead I want to share the index page url. It seems I can't change the url in the tag og:url because otherwise the meta data information will be get from the index page.

So how I can share the result information but with only the link to the index page?

1

There are 1 best solutions below

1
On BEST ANSWER

Whatever's in the OG tags is tied to that URL. But, I'd say there were two options for getting this to share correctly.

First, why not use the feed dialog options to fill in the share dialog to mention the result that the user got? Set the caption, picture correctly, and link to the starting page of the quiz.

Or, create a few extra starting pages. Create a quiz to start the page from somebody who shared that they got Superman, and another for somebody who got Batman.