renjith abby
renjith abby

Reputation: 23

dymaically changing the meta tag values!! works fine with debug tool but not working while posting with graph api explorer

I am posting an Open Graph "Level Up" action however while I am testing I am getting strange results. I have set the code to dynamically change the title so that it says Level "1", Level "2" etc.

url.php?level=6

. and this works perfectly on the debug tool, updating the title with whatever parameter value I pass in. The problem comes when I actually try to post using the Graph API Explorer tool. For some reason whatever parameter I pass, ie. =1, =2, it doesn't seem to take the parameter value. Has anybody encountered the same problem?

Upvotes: 0

Views: 540

Answers (2)

Viktor
Viktor

Reputation: 401

You can post request in Windows using Fiddler. Don't forget to set User-agent header (if you really check it). I have the same issue. Checked my logs: FB does not even try to load my object by specified URL! After checking link in Debug Tool or making a request from Graph API Tool it will work. There's already bug report on FB

Upvotes: 1

Igy
Igy

Reputation: 43816

Each URL needs to be accesible by Facebook's Debug Tool and needs to be be internally consistent without redirects or loops.

If on a page, you have an og:url tag, Facebook will load that URL instead, so if your URL includes parameters which control the output of the meta tags, the og:url tag needs to include the same parameters which loaded the page in the first place.

If you're not sure what the debug tool is seeing, and don't trust it for some reason, you can make a manual request using curl on the command line to see what Facebook is detecting: url -A "facebookexternalhit/1.1" -i [URL GOES HERE]

Upvotes: 0

Related Questions