Facebook likes with multiple third-level domains or switching domains - facebook

Is it possible to configure a Facebook app to have FB likes on a website "aggregated" on different third-level domains?
So, for instance, all the likes on http://example.com/page-to-like are the same of http://www.example.com/page-to-like and https://secure.example.com/page-to-like ?
This could be very important also in case of switching to a new domain (third or second level). It's really incredible that with a domain switch all the likes will be erased...isn't it?
I already searched about on Google, Facebook and here without success, so I think that it's not possible to to this but this is the last try.
Thank you.

Either of these will work:
On all three pages, point the like buttons to one of the pages, all likes will accumulate on the page you point the like buttons at.
On the three URLs, set your og:url meta tag to point to the canonical URL for that content (i.e pick the 'main' URL for that content)

Related

Facebook Likes Button Reset to Zero after Website Migration [duplicate]

I understand the og:url meta tag is the canonical url for the resource in the open graph.
What strategies can I use if I wish to support 301 redirecting of the resource, while preserving its place in the open graph? I don't want to lose my likes because i've changed the URLs.
Is the best way to do this to store the original url of the content, and refer to that? Are there any other strategies for dealing with this?
To clarify - I have page:
/page1, with an og:url of http://www.example.com/page1
I now want to move it to
/page2, using a 301 redirect to http://www.example.com/page2
Do I have any options to avoid losing the likes and comments other than setting the og:url meta to /page1?
Short answer, you can't.
Once the object has been created on Facebook's side its URL in Facebook's graph is fixed - the Likes and Comments are associated with that URL and object; you need that URL to be accessible by Facebook's crawler in order to maintain that object in the future. (note that the object becoming inaccessible doesn't necessarily remove it from Facebook, but effectively you'd be starting over)
What I usually recommend here is (with examples http://www.example.com/oldurl and http://www.example.com/newurl):
On /newpage, keep the og:url tag pointing to /oldurl
Add a HTTP 301 redirect from /oldurl to /newurl
Exempt the Facebook crawler from this redirect
Continue to serve the meta tags for the page on http://www.example.com/oldurl if the request comes from the Facebook crawler.
No need to return any actual content to the crawler, just a simple HTML page with the appropriate tags
Thus:
Existing instances of the object on Facebook will, when clicked, bring users to the correct (new) page via your redirect
The Like button on the (new) page will still produce a like of the correct object (but at the old URL)
If you're moving a lot of URLs around or completely rewriting your URL scheme you should use the new URLs for new articles/products/etc, but you'll need to keep the redirect in place if you want to retain likes, comments, etc on the older content.
This includes if you're changing domain.
The only problem here is maintaining the old URL -> new URL mapping somewhere in your code, but it's not technically difficult, just an additional thing to maintain in the future.
BTW, The Facebook crawler UA is currently facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
I'm having the same problem with my old sites. Domains are changing, admins want to change urls for seo etc
I came to conclusion its best to have some sort uniqe id in db just for facebook - from the beginning. For articles for example I have myurl.com/a/123 where 123 is ID of the article.
Real url is myurl.com/category/article-title. Article can then be put in different category, renamed etc with extensive logic for 301 redirects behind it. But the basic fb identifier can stay the same for ever.
Of course this is viable only when starting with a fresh site or when implementing fb comments for the first time.
Just an idea if you can plan ahead :) Let me know what you think.

Making sense of multiple like buttons/boxes and Facebook pages

I have a slightly confusing setup on my site right now with:
A like button with the data-ref attribute set to the root domain of my site
A like box with date-ref set to a Facebook page I created for my site.
These obviously leads to different things, as the like button has 2.7k likes while the like box/Facebook page has around 600. This last number is also the number of likes I see on my regular Facebook page.
Now I also noticed that I have a second Facebook page saying it is the administration page for my webpage. The page has never been used to post anything, and it doesn't seem to be visible to anyone but me. This page has 700 likes.
I've been reading documentation on this stuff, but I'm not feeling confident about merging the pages or anything just yet, so I have a couple of questions I'm hoping someone with more Facebook experience than me can answer:
Where does this 700 number come from? It's not displayed on either my like button or my like box.
Is there any way for me to combine these three different counts into one?
The 700 is the count of people that liked the URL after you created the admin page which represents that URL - this is irrelevant now as that functionality is deprecated. ( see the link CBroe provided: developers.facebook.com/docs/reference/plugins/like/migration
It is not possible to migrate fans from one object or page to another, except as was allowed during the migration period outlined in that document, if you didn't migrate during that period you cannot move the fans of the site/domain to be fans of the Facebook page instead

Sharing a Facebook URL (new way)

The site I work for is currently using the old sharer.php mechanism for sharing a URL.
We have it designed into our site, but want to incorporate a new method of sharing it.
The shares that we have now.. currently have this structure:
http://mysite.com/shorturl
www.mysite.com
Our users are clicking the second URL versus the first URL, and we don't know how to get rid of the www.mysite.com clickable part.
So with the new Facebook like/recommend structure here are my questions:
1) Is it possible to skin the like/recommend how you used to could the Share link? Use our own custom button to open the share popup or even do it on the page, but just fit it into our style? (Our button is much larger than the Facebook like/recommend button).
2) Is it possible to change, make non-clickable/disabled, or remove the www.mysite.com link from the sharer.php method?
Thanks in advance!
1) No skinning available with the new one thanks to many bone-heads who ruined it for us by abusing that privilege.
2) I cannot figure out what you mean by that. But as a guess, Facebook will count www.example.com as the same as example.com in the counts as long as they end up at the same content with the same og meta tags. For more information about how the og tags work, see http://ogp.me.

How to move facebook likes on wordpress from one domain to another

Background
I have a domain say www.foo.com. I host my wordpress blog there.
There are many facebook likes on the posts i have put up.
Now I have redirected www.foo.com to www.boo.com and closed the foo.com domain.(On the server i have simply copied the files from foo.com to boo.com's folder.The database is the same for both.)
Problem
The problem i am facing is that the facebook likes are "Gone". How can i retrieve the facebook likes? Are the likes linked to domain name ?
You can do this with a 301 redirect, although its not 100% reliable.
I kept my goggle page rank and facebook page likes when moving between www.foo.co.uk and www.foo.com I completely changed the design and url (although foo was the same). Facebook and google+ and google page rank followed the 301's and attributed it to the new page. Having said that if your original site is closed it may be a problem.
You cant do this. Even if in your case it is a valid request - think about the meaning of this action. if it were possible people couild just move likes from pages to other pages, from applications and from websites... users that liked "foo.com" DIDNT like "boo.com", the fact that the content is exactly the same is purely coincidence. The user did not "like" that second URL therefore you can not "move" likes...
Perhaps if you contact facebook (as a developer) they might be able to assist you - but there is no method that us (non Mark Zuckerberg types) can do.

Is it possible to combine a facebook page and a website in the social graph?

Facebook has "pages" for many things, like people, companies, etc. But it also has this open graph protocol. My company already has a web site, and we also have a facebook page (i.e. http://www.facebook.com/company)
People can "like" either one. We use a like iframe on the company website that refers to the website URL. I'd like to know if they can be connected such that when someone likes our facebook page, they really like our company's web site.
Or are these always going to be considered two different things?
To elaborate on puffpio's answer, you can have a like button for your existing page on you website by using the existing page's facebook url as the href parameter.
It is essential that you do not put a like button to your url if you do not want your likes split between the two. In this scenario there is no reason to have an open graph object for your page other than to provide correct data when a user shares your url in their feed. It's important to note that these shares also count towards the counter on the like button and as far as I know there is no way to recover them.
You can also use this url as your og:url tag however this will cause the linter to throw errors since the domains do not match.
No. Page and website is something different and you can't force user to like both
They are different things, but a workaround is that the like button on the company's website can be a like button for their page on Facebook with a caveat like 'Like us on Facebook' or something