Move facebook likes from one url to another - facebook

Over time I have built up a number of facebook likes on page = http://www.andy-howard.com/verticalAndHorizontalAlignment/index.html
But I need to convert this page to a php script (to be content manageable). Most likely it will be = http://www.andy-howard.com/code-help.php?id=143
Is there a way I can transfer my existing facebook likes to the new url?

You can’t transfer likes from one URL to another.
Only thing you can do, is make Facebook “believe” that the URL is still the old one – by setting the og:url meta tag in your new pages to the old URLs.
Facebook will use that value as the canoncial URL to identify this Open Graph object and to fetch the Open Graph information from, so you will have to see to it that those old URLs are
still available for the FB scraper to visit,
give it the OG info it is looking for, and
that “normal” visitors are redirected to the new URL, should Facebook link them to the old one
How to detect that the FB scraper is requesting your page, is described here: https://developers.facebook.com/docs/reference/plugins/like/#scraperinfo

I don't think there is a way to transfer likes from one url to another. Facebook like plugin is designed so that you can be on one page while actually liking completely other page (i.e. url). If that likes really matter, you can save the old url in database for each content and continue collecting likes for that url and just redirect visitors from that url to the new one.

Related

Facebook share count for changed URL

We often change URL of articles on the site, and then the old URL returns 301 redirect to the new URL.
During a limited time we can still retrieve share count for the old URL (using FQL) and it continues to grow (I think because of re-shares). But after the page is re-scraped Facebook "realises" that both URLs point to the same page and the old share count is lost, both URLs return the same count:
http://graph.facebook.com/fql?q=SELECT+url%2C+total_count+FROM+link_stat+WHERE+normalized_url+in+%28%27http%3A%2F%2Fwww.dailymail.co.uk%2Fnews%2Farticle-3657160%2FBritain-brink-EU-referendum-result-knife-edge-Leave-scores-HUGE-victory-Sunderland-outperforms-predictions-Swansea-Remain-pins-hopes-London.html%27%2C%27http%3A%2F%2Fwww.dailymail.co.uk%2Fnews%2Farticle-3657160%2FDavid-Cameron-QUITS-Prime-Minister-voters-Brexit-EU-referendum.html%27%29
There are several questions:
Is there any way to "assign" share count of the old URL to the new URL?
Is there any way to retrieve old share count?
Maybe, there is a way to instruct Facebook to never re-scrape a particular URL so it can always have old share count available?
Would re-shares of old URL be added to share count of new URL (after the page is re-scraped and facebook links two objects)?

Facebook appends parameters to a url when it is liked

I’ve recently added a Facebook like button to a site of mine and all seems to work fine except that the post on my Facebook wall has a url with a load of parameters appended to the url.
Example: http://domain.com/this-is-a-new-post-to-test-the-url?fb_action_ids=1403388974344336068&fb_action_types=og.likes&fb_ref=sp_facebook_57&fb_source=aggregation&fb_aggregation_id=247881481237582
I have set the open graph meta tag but this does not seem to make any difference.
What I find interesting is that some pages I’ve liked (on a different domain) don’t have these parameters appended to it.
The question is: how to “sanitise” the url on my Facebook wall so it looks like http://domain.com/this-is-a-new-post-to-test-the-url and NOT like http://domain.com/this-is-a-new-post-to-test-the-url?fb_action_ids=1403388974344336068&fb_action_types=og.likes&fb_ref=sp_facebook_57&fb_source=aggregation&fb_aggregation_id=247881481237582
Facebook adds these parameters so that website owners can keep track of where incoming traffic from Facebook originated and can not be removed.

Reset facebook like url for pages

We've had few pages on our site which were open only for signed-in users. However, the urls of these pages were shared on facebook and whenever facebook visited these pages it got redirected to common page which is shown for non signed-in users.
Now, we have opened these pages for all and implemented like button on these pages. And whenever someone likes one page it gets reflected on other pages as well, I am assuming this is because facebook internally still thinks all point to same url.
However, I am setting the href attribute to these pages, still it doesn't work.
Is there a way where I can reset the counter for these pages and make facebook treat these as new pages? I did try passing few GET params, still it shows old counter
Enter the URLs into this Facebook Lint form (or make requests to this page with the proper parameters from an application) and it will clear Facebook's cache of those pages.
https://developers.facebook.com/tools/debug
I figured it out. I just had to make facebook re-crawl these pages again. I could have waited for 24hrs, which is the frequency with which facebook crawls pages. I chose to use facebook linter, which makes facebook query the url immediately
http://developers.facebook.com/tools/debug

How to force facebookexternalhit to reaccess?

I'm playing with facebook links via posting them. On the frist time a access from a user agent containing "facebookexternalhit" will visit your site and look for some meta tags.
So far so good that works. But if I try to repost the link no furure calls happens. How can I trigger to let facebook read the page again?
Are there some API calls I can use to trigger an update?
in the documentation for the Like Button it says:
When does Facebook scrape my page?
Facebook needs to scrape your page to know how to display it around
the site.
Facebook scrapes your page every 24 hours to ensure the properties are
up to date. The page is also scraped when an admin for the Open Graph
page clicks the Like button and when the URL is entered into the
Facebook URL Linter. Facebook observes cache headers on your URLs - it
will look at "Expires" and "Cache-Control" in order of preference.
However, even if you specify a longer time, Facebook will scrape your
page every 24 hours.
The user agent of the scraper is: "facebookexternalhit/1.1
(+http://www.facebook.com/externalhit_uatext.php)"
The Linter is now known as the Facebook Debugger and when you use it for a url, it will clear the facebook cache for the same url and will then cache the new result.
One trick you can use is to simply append a "random" GET parameter to the URL that you're sharing. It won't have any effect on the page's content, but will cause Facebook's scraper bot to reaccess your site.
Original URLs:
http://example.com
http://example.com?param=1
New URLs that will force a "reaccess":
http://example.com?cache_buster=784932789532
http://example.com?param=1&cache_buster=784932789532

Link to fan-page with app_data parameter removes the app_data parameter

I have a FB app in an iframe on a Facebook fan-page. If I create a URL linking to that page, and that URL contains an app_data parameter, like this:
https://www.facebook.com/pages/My-Page/123?sk=app_456&app_data=mydata
Then post that in my FB feed, FB strips the app_data parameter, reverting to the canonical URL for the fan page:
https://www.facebook.com/pages/My-Page/123?sk=app_456
Which isn't what I want.
I would consider this a bug, as the state of the application is part of the "canonical" state of the fan page, but for now: Any way to get around this?
I have thought about making the bookmark to my own page:
https://facebook.mysite.com/pages/My-Page/123?sk=app_456&app_data=mydata
and dynamically generate a page with all the OpenGraph tags from the corresponding FB page (to make FB sharing work), and a redirect to the fan page (to get the user to the right place) - but this requires either (a) scraping FB for those OpenGraph tags or (b) accessing the graph.facebook.com api programmatically in a crawl-like fashion, and I don't know what FB thinks of that.
G'Day Leo, might be a bit of a hack but seems to work. I link my app_data onto a separately hosted URL and redirect back to Facebook with it.
So my URL I share is: https://externaldomain.com/deeplinker.aspx?data=stuff
Then response a redirect which is: https://www.facebook.com/[pageurl]?sk=[app]&app_data=[data]
With [data] = stuff