facebook share button og:url error - facebook

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.

Related

Facebook share doesnt fetch the photo

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.

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..

Facebook share: title is not displaying on share box

I am sharing my link to Facebook. When I click the share button, it goes to the Facebook share page. Everything is fine except the title is not displayed, although the title is there in the query string.
Below is my code. Please guide me in details that how to display title and description also.
<!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>Humayoo Social Book Mark</title>
<meta property="og:title" content="Smith hails 'unique' Wable legacy" />
<meta property="og:description" content="John Smith claims beautiful football is the main legacy of Akhil Wable's decade at the club. " />
<meta property="og:image" content="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" />
<meta name="medium" content="blog" />
<script type="text/javascript">
function whenclick() {
var uri = "http://192.168.1.10/test.aspx&t=abc";//here my domain name or ip
window.location = "http://www.facebook.com/sharer.php?u="+uri;
}
</script>
</head>
<body>
Share
</body>
</html>
It might be happening because of it can not be linted by Facebook properly that you try from localhost.
To see whats happening in Facebook-side, try Debugger: http://developers.facebook.com/tools/debug/
You can see open graph meta information gathered by Facebook and also errors that you have.

How to set title, img, and description on wall post made from facebook comments

I'm building a facebook iFrame application that uses facebook comments. When a user leaves a comment the default action is that this comment will be posted to their wall. The wall post is something along the lines of
UserX commented on example.com
# the comment text goes here
http://example.com
apps.facebook.com
You should be able to include an image, a description, and set the link to be the title of the page (where it says http://example.com above the apps.facebook.com), but I'm having no luck getting this to work.
I thought it would grab the information from my meta tags (as long as they included the appropriate 'og' tags), but that isn't working. Nor am I able to define values for title, url, image etc. in the same way that you can for normal wall posts.
Anyone have any idea how to get this working??
EDIT:
Here are the meta tags I currently am using.
<meta property="og:title" content="USERNAME'S PAGE" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.com"/>
<meta property="og:image" content="http://example.com/images/wall-post.png" />
<meta property="og:description" content="Some description goes here." />
Use URL Linter to Debug
http://developers.facebook.com/tools/lint/
Make sure all meta tags are correct and if you've made some changes, it takes some time to update for facebook and here's a sample, this is a working version:
<!doctype html>
<html xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml" lang="en">
<head>
<meta charset="utf-8">
<title>Facebook Comment Box Sample</title>
<meta property="og:title" content="YOUR-POST-TITLE"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://YOUR-SITE-URL"/>
<meta property="og:image" content="http://YOUR-IMAGE-URL"/>
<meta property="og:site_name" content="YOUR-SITE-TITLE"/>
<meta property="og:description" content="YOUR-DESCRIPTION"/>
<meta property="fb:admins" content="YOUR-USER-ID"/>
</head>
<body>
<h1>Facebook Comment Box:</h1>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:comments href="http://YOUR-SITE-URL" num_posts="10" width="500"></fb:comments>
</body>
</html>
OK, after a lot of stumbling around I figured this out.
My iFrame application requires facebook authentication before accessing the application (as I believe all facebook apps do). This means that the facebook crawlers were unable to crawl my homepage and pick up the og: meta tags.
To solve this I first had to figure out what the facebook crawler looks like. I logged the HTTP_USER_AGENT for all requests and then used the facebook URL Linter (http://developers.facebook.com/tools/lint/) to ping my site.
The facebook crawler identifies itself as "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
Once I had that I was able to just add a little conditional logic to let the crawler bypass authentication and access my site. I hope this helps others.
First I made sure I had all my meta properties set, then I just put my code in this:
if (strpos($_SERVER['HTTP_USER_AGENT'],"externalhit_uatext")<5)
{
}

Facebook Article Problem

Ok here is the think
suppose you want to submit a link to your mates wall,
You copy/paste a link and facebook generates title, image and description.
Curently i am working on http://www.compra.gr
When you want to submit this link (http://www.compra.gr) facebook generates characters that are not recognised.
When you want to submit http://compra.gr/index.php?option=com_content&view=category&layout=blog&id=35&Itemid=54
Facebook generates title,image and description normally.
I know that facebook takes the information from metadata. I corrected the metadata, however nothing happened.
Please help me if someone has a a clue what is going on.
Thank you in advance.
PS the site has copyright protection, in order to view the source code use google chrome and at the address bar enter view-source:http://compra.gr/
I know whats the problem, your site does not have Open Graph tags!
Check out: https://developers.facebook.com/docs/opengraph/
Here's a snippet for you to understand, add this to your site and then use
URL Linter to Debug: http://developers.facebook.com/tools/lint/
Open Graph Tags Snippet:
<!doctype html>
<html xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml" lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
<meta property="og:title" content="YOUR-POST-TITLE"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://YOUR-SITE-URL"/>
<meta property="og:image" content="http://YOUR-IMAGE-URL"/>
<meta property="og:site_name" content="YOUR-SITE-TITLE"/>
<meta property="og:description" content="YOUR-DESCRIPTION"/>
<meta property="fb:admins" content="YOUR-USER-ID"/>
</head>
.....
</html>