The facebook like plugin (used as iframe) still not working for the website i work.
I'm aware for the problems that ocurred last week but I don't even have the debugger working for the URLs.
Example:
simple article
In the image below you can see where the fb:like button should appear.
The same URL of the article above at the facebook URL debugger (link) show no response about the open graph tags - and all the meta tags are ok in my point of view:
<meta property="og:url" content="http://extra.globo.com/famosos/zilu-assume-pela-primeira-vez-que-esta-separada-de-zeze-di-camargo-vida-continua-5767649.html"/>
<meta property="og:title" content="Zilu assume pela primeira vez que está separada de Zezé Di Camargo: ‘A vida continua’" />
<meta property="og:locale" content="pt_BR">
<meta property="og:type" content="article" />
<meta property="og:image" content="http://extra.globo.com/incoming/5767648-1c6-157/w107h60-PROP/zilu-zeze-dicamargo.jpg"/>
<meta property="og:site_name" content="Extra Online" />
<meta property="fb:app_id" content="205680889447721"/>
<meta property="fb:admins" content="100000043813964" />
Actually, there is one non-closed meta tag og_type but it isn't the real problem (meta at w3schools - section Differences Between HTML and XHTML and the page doctype is HTML).
There is a possibility of a problem not in the website but at facebook?
I would try to put the Like button iFrame outside of the <div
id="fb-root">, it does not belong there. Put it below the <div
id="fb-root"> and use a div with another id if you need to wrap it.
For the debug tool problem I would try to place my og meta data above
anything else right behind <meta http-equiv="content-type"
content="text/html; charset=utf-8"> so that nothing odd happens
before the Facebook bot scrapes the info it needs.
Related
When I click on the link button on my website , I get the notification on Facebook that I have liked such and such thing and along with that my Logo of the website Appears. However I want that the logo of the website is not shown but instead the Image of the product is shown.
I am using the step 1 like button on this URL https://developers.facebook.com/docs/reference/plugins/like/
You need to look at open graph meta tags and in particular the image tag. og:image.
A full example of tags and how they work can be found here http://developers.facebook.com/docs/opengraphprotocol/ but the general jist of what you need is:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>My Movie Website</title>
<meta property="og:title" content="My Movie Website"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://mymovies.com/images/logo.png"/>
<meta property="og:site_name" content="My Movies"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
content="Some content description blah..."/>
...
</head>
...
</html>
By setting this tag it should tell Facebook the image to load. You can test this via Facebooks tools online here http://developers.facebook.com/tools/debug
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
I would like to ask how to add data with links after the description to a Facebook post, what meta tags i should use to have such result like image below
http://alternative-spaces.com/UPDATE/screen_shots/GraphProtocol.png
Here is my code
<meta property="og:title" content="Exciting views and amazing floor plans"/>
<meta property="og:url" content="http://mysite.com/"/>
<meta property="og:description" content="sdfsfsd http://mysite.com/" />
<meta property="og:image" content="http://somagrand.com/images/fb_icon.jpg" />
<meta property="og:site_name" content="content"/>
<meta property="og:type" content="company" />
<meta property="fb:app_id" content="229103737100322"/>
<meta property="og:latitude" content="33.8164994"/>
<meta property="og:longitude" content="-116.5469377"/>
<meta property="og:street-address" content="1160 Mission St."/>
<meta property="og:locality" content="San Francisco"/>
<meta property="og:region" content="CA"/>
<meta property="og:postal-code" content="94103"/>
<meta property="og:country-name" content="USA"/>
That post wasnt made by liking a page on that site and therefore wont be concerned with open graph tags. It was done through the legacy REST API action stream.publish - if you go here: http://www.musicolio.com and click the 'share' button at the top you will notice the URL for the popup is something like this (once decoded):
https://www.facebook.com/dialog/stream.publish?action_links=[{"text":"Join Now","href":"http://www.musicolio.com/"}]&api_key=138938132827513&app_id=138938132827513&attachment={"name":"Musicolio","href":"http://www.musicolio.com/","description":"Collaborate on music projects, connect with musicians, find talented musicians, find work in the music industry.","media":[{"type":"image","src":"http://www.musicolio.com/blog/wp-content/uploads/2010/12/micon.png","href":"http://www.musicolio.com/"}],"properties":{"Get Discovered":"Monitored by industry executives","Private":"No Spam","Job Boards":"Get work, get paid","Free":"Get connected for free"}}&display=popup&locale=en_US&next=https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb=f24407dddc7a49a&origin=http%3A%2F%2Fwww.musicolio.com%2Ff1be678fb013a1e&relation=opener&transport=postmessage&frame=f11e216310dbbde&result=%22xxRESULTTOKENxx%22&sdk=joey&target_id=
I've highlighted the part you're interested in. More information on this can be found here: http://developers.facebook.com/docs/guides/attachments/
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!
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)
{
}