Open Graph - Fetched and Canonical URL in a Posted Action

2.3k Views Asked by At

We are currently testing the Facebook functionality of our desktop application. We defined a Facebook app, then created open graph actions, objects and aggregations.

  • First question: in case the fetched (the object URL) and canonical (og:url) URLs differ, why the tags are taken from the canonical URL and not from the fetched URL? What's the use in having a fetched and a canonical URL in the first place?

  • Second question: when an action is posted and the user follows the corresponding link in a Facebook aggregation box, we see that additional parameters are combined in a query string with our og:url (e.g. ?fb_action_ids=##&fb_action_types=...&fb_source=recent_activity ). Is there a way to have our og:url preserved and not extended in such a way?

1

There are 1 best solutions below

0
On

For the second question, it should be simple enough to set up an object page that strips the query string. You can simply use a meta refresh to redirect the user wherever you like, or you could use javascript:

<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# appname: http://ogp.me/ns/fb/marrymakelovemurder#">
<meta property="fb:app_id" content="app_id" /> 
<meta property="og:type"   content="namepace:object" /> 
<meta property="og:url"    content="Put your own URL to the object here" /> 
<meta property="og:title"  content="Sample Game" /> 
<meta property="og:image"  content="https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png" /> 

<meta http-equiv="refresh" content="0;URL='http://redirectURL'" />