facebook "i like" question - facebook

I'm using facebook "i like" on my site. facebook uses the title tag of the page as what the person likes. is there a way to add a different title instead of defaulting to the title tag of the page?

You need to add OpenGraph property "title" inside the "head" tag of your site for that:
<meta property="og:title" content="Title for FB" />
You can then use linter to check if what Facebook thinks about your page is okay with you.

Not that I know of, but you can point it to a different URL using the href attribute. Your website could return your modified page title at that URL.
Source: API docs

like alessandro says. Its possible using the href atribute
<fb:like layout="button_count" class="like_button" href="your url stuf here"></fb:like>
I use php to put dinamically the href stuff, so using some RewriteRule on my htaccess and the tittle in the generated html , i can show what ever i whant, when they press the like button

Related

Facebook "Like" request parameters absent

We have a like button. We populate the data-href with something like: http://foo.com/stuff/1?tracking=member1
When facebook scrapes our page for the title and images defined in the "og" meta tags, it disregards the original request parameters from the data-href. This means we can't customize the title and image based on the referring member, but this is exactly what we need to do.
We have tried all sorts of combinations of values for the data-href and og:url fields to no avail. Does anyone have any ideas?
within the head tags:
<meta content="This title should be based on the referring member" property="og:title"></meta>
<meta content="Content would go here" property="og:description"></meta>
<meta content="http://foo.com/stuff/1" property="og:url"></meta>
<meta content="http://foo.com/images/hello.png" property="og:image"></meta>
<meta content="Foolandia" property="og:site_name"></meta>
and then our like button tag:
<fb:like data-action="like" data-href="http://foo.com/stuff/1" data-ref="member1" data-send="false" data-show-faces="false" />
So, after several permutations and combinations, this is how we were able to address this issue:
We added the member id to the data-href (http://foo.com/stuff/1?tracking=member1) and removed the og:url from our meta-tags. Facebook now scrapes our page with the url: http://foo.com/stuff/1?tracking=member1 and we're able to customize the title and image displayed on facebook based on the referring member.
Thanks for all the help!
Are you sure the value for og:url tag your URL is returning to the Facebook crawler is the same one in the data-href? facebook will, if it finds a canonical meta tag or og:url tag on the scraped page, discard the metadata and retrieve metadata from the canonical URL instead.
You can test what facebook detects for a URL with Facebook's Debug Tool

Like per page not displaying correct URL on profile

I am using facebook like social plugin as follows.
<fb:like send="true" width="320" show_faces="true" font=""></fb:like>
If there is no href defined, this is said to be pick the current page.
I have a news website and I just want to integrate this like plugin per page, and when someone like a specific news page, i want that to be displayed in user profile.
However this is not the case right now.
I have debug it with firebug and it s getting/sending correct URL to facebook but on facebook profile, i dont see that URL that was liked.
How can i do that?
Why don’t you just put the actual URL into the href attribute of fb:like …?

og:url is driving me crazy?

hope you can help me...
I want to have a page with facebook metatags, like:
<meta property="og:title" content="TITULO" />
<meta property="og:type" content="website" />
<meta property="og:image" content="http://profile.ak.fbcdn.net/hprofile-ak-snc4/277072_61646342824_993843268_n.jpg" />
<meta property="og:url" content="http://www.clarin.com" />
and the problem is that instead of showing the descriptions, titles and images that I define in the metatags of my page, the facebook like box is generated with the url defined in my og:url. I was reading documentation and it seems that it should be in that way.
But I still want the facebook like box generated only with the metatags of my page, and not with the url defined in og:url.
is it possible? someone has done?
og:url basically tells the FB scraper "ignore anything on this page, and scrape this url instead"
So it's doing exactly what it's supposed to do. If you want the like button to point to a different url, use the href parameter and have it point to a different url.
See https://developers.facebook.com/docs/reference/plugins/like/ for more information.
I think I understand what you are asking. Like #Jeff Sherlock said "og:url basically tells our scraper "ignore anything on this page, and scrape this url instead"..."
So if og:url is anything other than the current page -- Facebook will try to scrape the open graph data from there instead.
If this is a page you are trying to send people to if they click on the 'like object' that is posted to a users wall (who has already liked your page) --
I made a tool for this exact purpose -- as I thought it might be helpful to others:
Facebook/Open Graph Like button Generator
It generates (and stores) the open graph tag(s) so you don't need to put them in your page at all and the 'Redirect URL' tells it where to send all the traffic.
It detects the Facebook bot/scraper too so it won't interfere with anything :)
Good luck
you can put the like button in an iframe. Furthermore, that iframe may or may not need to be filled by setting a src attribute. I would try adding the like button code as innerHTML, and then try a separate file to set the src to.
It would look something like this:
<iframe><place like code here></iframe>
When that doesn't work, place the like code in a separate file, and set the src of the iframe to that file. Let me know if you have quesitons

Facebook like button links to the home page

I have a website with a like button to the homepage and several subpages with their own like button. When I "like" a subpage and I look in my facebook profile, the link that appears redirects back again to the home page. Can someone please explain em why this happens? Id be most grateful.
These are the subpages in question:
http://XXXXXXX
Thanks
On that page you have <meta property="og:url" content="http://www.waermepumpen.de" />
This means that regardless of which page actually has the Like button, you're telling Facebook that this page is another way of accessing the canonical URL http://www.waermepumpen.de
You should set the og:url meta tag to be the same URL which users will use to access the page - in the example you posted it's http://www.waermepumpen.de/waermepumper-des-jahres/galerie-der-waermepumper/no_cache/1/ - this should match the 'href' parameter of the tag too.

facebook api, how to change the name of the category when u like something?

i am trying to add a like button on my webpage and when i like something in facebook appears under Website category. I would like to change that. Any Ideas?
here is my fb like button:
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=app id here&xfbml=1"></script><fb:like href="http://www.xxx.com" ref="casting" send="false" layout="button_count" width="100" show_faces="false" font="arial"></fb:like>
thanks
Define the og:type meta property on your page. You can find available options here. For example:
<meta property="og:type" content="athlete" />
Note that the meta data will have to be defined in the <head> portion of your site (as all meta tags should) or Facebook will ignore it.
You might want to look into the open graph protocol to see some other stuff you can define for the "likes".
Additionally note that editing the og:type on a page which has received more than 10,000 likes will not be changed anymore as they have become fixed at that point.
As fijter noted below, Facebook looks for this meta data from the url which is used for the like button. If you have a like button with an url which you can't control, you won't be able to modify the meta data associated with it.
If your page has been liked already (but less than 10,000 times) and you change your meta data, run the Facebook URL linter tool to have Facebook refetch the meta data from your site.