Facebook share doesnt fetch the photo - facebook

Hello Ive been struguling with this for a while.. and just cant get my head around it.
I do have the meta tags required :
<link rel="canonical" href="http://www.profsonstage.com" />
<meta property="fb:app_id" content="366418850196673">
<meta property="og:title" content="ProfsOnStage"/>
<meta property="og:site_name" content="ProfsOnStage" />
<meta property="og:description" content="Welocme to ProfsOnStage Web Site" />
<meta property="og:url" content="http://www.profsonstage.com" />
<meta property="og:type" content="article" />
<meta property="og:image" content="http://www.profsonstage.com" />
But when I try to use the share button facebook scraper doesnt fetch any data but the link.
When I check what the scraper sees I get :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>function set_cookie(){var now = new Date();var time = now.getTime();time += 19360000 * 1000;now.setTime(time);document.cookie='beget=begetok'+'; expires='+now.toGMTString()+'; path=/';}set_cookie();location.reload();;</script>
</head>
<body></body>
</html>
I hope anyone can point me into the right direction to fix this. Checked a lot of similar questions but I was unable to find an answer regarding this issue.
Also I get this in my console log
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
And My APP urls are :
www.profsonstage.com/
profsonstage.com/
I just don`t understand what is the problem here.

Seems like its a hosting issue. If anyone get a problem like that contact your hosting provider.

Related

Facebook debugger is caching meta data for an old IP address

When I try and scrape my URL, http://development.classroom.me.uk, with the Facebook debugger at https://developers.facebook.com/tools/debug, I get back information for an older version of the website on an IP address that is no longer hosting this site.
The original IP was 46.32.233.216, but the new IP is 212.67.215.188.
I have another website running on the new IP:
http://advert.classroom.me.uk
This website gets scraped without any issues, so this is not a firewall problem.
Facebook is caching the domain http://development.classroom.me.uk with the old IP, which is why the scraper is returning a 502 [bad gateway] response. It is retrieving out of date data, but unable to actually return the URL:
Go to http://development.classroom.me.uk, and view source.
In the document head, you will see:
<meta property="og:title" content="classroom" />
<meta property="og:description" content="classroom provides a digital communication platform for teachers and students" />
<meta property="og:type" content="website" />
<meta property="og:image" content="http://development.classroom.me.uk/images/logo/logo-facebook.png" />
<meta property="og:url" content="http://development.classroom.me.uk" />
Go to https://developers.facebook.com/tools/debug, and type in http://development.classroom.me.uk into the input field. Press 'Debug'
I would expect to see information about the Facebook meta tags provided above.
I actually see data from an old version of this website held on an IP address that no longer hosts this site. In fact the old website contains no Facebook meta tags at all, which is why you can see data being scraped from the HTML title & standard meta description tag, instead...
Can anyone provide a solution for how I can clear the Facebook proxy cache. I have tried submitting this issue several times on Facebook, but no one from Facebook has provided me with a proper solution...
Thanks in advance
OK. With the help of the Facebook IT Department, we got to the bottom of this one. Indeed, the data was being cached. This was not a firewall issue, as I suspected, even though I was told repeatedly that it was.
I placed a new index page up at http://development.classroom.me.uk on my new IP 212.67.215.188
The page contained an HTML skeleton. See below [note, I placed no data in the document body]:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="keywords" content="classroom, home, yoga, indian head massage, tai chi, feng shui, united kingdom, therapy" />
<meta name="description" content="classroom provides a digital communication platform for teachers and students" />
<meta name="robots" content="index, follow" />
<meta property="og:title" content="classroom" />
<meta property="og:description" content="classroom provides a digital communication platform for teachers and students" />
<meta property="og:type" content="website" />
<meta property="og:image" content="http://development.classroom.me.uk/images/logo/logo-facebook.png" />
<meta property="og:url" content="http://development.classroom.me.uk" />
<title>classroom</title>
</head>
<body>
</body>
</html>
I then used the Facebook debugger at https://developers.facebook.com/tools/debug to scrape this address again. Voila. The page returned a 200 response & the correct meta data.
The cache has been cleared.
Unfortunately, when I returned the correct index page back to http://development.classroom.me.uk, I still get a 502 response from the Facebook debugger. However, the important thing, is that the correct meta data & image remain.
I am going to try and work out why I am getting the 502 response, and when I do, I will let you know. I thought I would write up the answer now, as I know several developers have been troubled by this issue..

Where is facebook pulling my canonical url from?

page in question:
https://play.decksi.com/share/45431f8d
faceook debugger link:
https://developers.facebook.com/tools/debug/og/object?q=https%3A%2F%2Fplay.decksi.com%2Fshare%2F45431f8d
For some reason, facebook is taking our app page ID as the canonical url, despite it not being on the page at all...
I have the exact same view on a sandboxed instance, and it behaves fine..
This worked fine until today (well i noticed today)...
Any thoughts?
Facebook's Debug Tool does already show why it picked up the apps.facebook.com page as the canonical URL, but in case you need to manually check:
It's in the HTML source of that page:
$curl 'https://play.decksi.com/share/45431f8d'
<!DOCTYPE html>
<html class="decksi_switchboard">
<head>
<meta property="og:title" content="Decksi" />
<meta property="og:type" content="activity" />
<meta property="og:url" content="https://apps.facebook.com/playdecksi" />
<meta property="og:image" content="https://play.decksi.com/Content/img/decksi_logo_bg.png" />
<meta property="og:site_name" content="Decksi" />
<meta property="fb:admins" content="100002131000570" />
Ah! so the answer is in fact, that we are geo-gatting this content (canada) and of course facebook is hitting from a US server!! So my curl doesn't look like yours, voila. – Monsters X 8 secs ago edit

facebook share button og:url error

I'm looking to add some "share" buttons to a webpage I'm working on. I keep getting an "og:url" and "og:title" error even though they're both there. Any help would be great. Below is the beginning of the webpage script. Thanks, Marc
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fccf pad promotion</title>
<meta property="og:title" content="FCCF Pad home"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://padsrockref.1sourceusa.com/fccfpad/" />
<meta property="og:description"
content="A great way to start the new year! Request some pads and One-Source will make a donation on your behalf to the FCCF."/>
When I go to the URL you specify (http://padsrockref.1sourceusa.com/fccfpad/) for og:url, I get a 302 redirect to another page (http://padsrockref.1sourceusa.com/PageNotFound.html). So there are no og meta tags for Facebook to process, hence why it is erroring out. Update it to a valid URL and I think that will solve your problem.

No "Admin Page" link on Facebook Like button on a web page

I have a website that uses the Facebook like button.
I am attempting to get the "Administration" link to show up on the page so that I can push content to people who like the page.
My page's HTML namespace is like:
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#">
My meta tags are like so:
<link rev="canonical" href="http://mysite.com/welcome/" />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="MySite" />
<meta property="fb:app_id" content="012345678910" />
<meta property="og:title" content="Name of my page" />
<meta property="og:description" content="Description here..." />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://mysite.com/welcome/" />
<meta property="og:image" content="http://mysite.com/path/to/image.jpg" />
I have checked the page with the Facebook debugging linter and it passes without any warnings or errors. I am an admin of the app.
What am I doing wrong?
Note: I've also tried to put the <meta property="fb:admins" content="01234567" /> in to no avail. I've also tried different xmlns tags and even without any xmlns tags.
There is no og:admins tag. Try fb:admins and fb:app_id tags:
<meta property="fb:admins" content="USER_ID1,USER_ID2"/>
<meta property="fb:app_id" content="1234567"/>
You'll also need to press the 'Like' button.
1) Are you logged into Facebook
2) How long have you been waiting it can take some time to trickle thru Facebook's Servers.
3) The correct tag is fb:admins check Page Administration on https://developers.facebook.com/docs/opengraph/ -
<meta property="fb:admins" content="USER_ID1,USER_ID2" />
Also your og:app_id is wrong it is fb:app_id
4) At the bottom of the debugger it will give you a Graph URL click that to confirm the admins are correct
Whats the URL you are trying in the debugger?
It appeared that the problem stemmed from having the wrong xmlns tags in the <html> element.
I had a custom xmlns tag that was sending likes to the wrong graph (I believe...).
The current tags that are working are:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
After this change, liking a page would show up the Administration link.
Thanks for the responses!

Facebook achievements registration is failing - url is not of type game.achievement

I'm trying to register an achievement on Facebook. I'm registering:
url: http://mydomain.com/achievement.php?gca=gc2
display_order: 300
But I get error: (#3502) Object at achievement URL is not of type game.achievement
In my url I have got:
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#"> <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# game: http://ogp.me/ns/game#"> <title>Achievement</title> <meta property="og:type" content="game.achievement" /> <meta property="og:title" content="a" /> <meta property="og:url" content="http://mydomain.com/achievement.php?gca=gc2" /> <meta property="og:description" content="x" /> <meta property="og:image" content="http://avatars.gg.pl/1" /> <meta property="game:points" content="25" /> <meta property="fb:app_id" content="MY-APP-ID" /> </head> <body>TODO</body> </html>
What is wrong? I think error tells about something else...
I've noticed it gives this error for a couple of different reasons, none of which has anything to do with the URL not being of the type "game.achievement".
The most obvious one is when the URL does not point to the right location. Verify that by pasting it in a browser (http://mydomain.com/achievement.php?gca=gc2 in your example.)
Another reason I found is when the app doesn't have its 'App Domain' set in the app settings. It doesn't require this for all apps, only for some. I found a hint about this (as the error is obviously no help at all) by entering the URL in the object debugger and enter the URL to your achievement.