Facebook 'like' referral clicks adding variables; not recognising the page linked as the page liked
Asked Answered
M

3

7

So i have a site, Let's call it foo.com and all of the pages have the Like Button plugin on it (same code rehashed on each page)

so I 'like' http://foo.com

Posts on my wall with a link, all fine and dandy

I do the same with my Projects page - http://foo.com/projects

It says in the info when you like it (the drop down that happens as you click like,) that they have 'liked' http://foo.com/projects. All is good; However the actual link on Facebook is :

http://foo.com/projects?fb_action_ids=10151073089123411&fb_action_types=og.likes&fb_source=other_multiline&action_object_map=%7B"10151073089123411"%3A10151036996391185%7D&action_type_map=%7B"10151073089123411"%3A"og.likes"%7D&action_ref_map=%5B%5D

Not only is this ugly, it also means that the like button is not counting for the /projects page, but the new /projects?fbcrap=....

{edit}

Also noticed that you can infact get into an infinite loop.

Person A likes http://foo.com/projects

Person B clicks link http://foo.com/projects from person A's wall Person B liked http://foo.com/projects?randomhashstuff

Person C clicks link http://foo.com/projects?randomhashstuff from person B's wall Person C liked http://foo.com/projects?anotherrandomhash

Result:

  • /projects = 1 like
  • /projects?randomhash = 1 like
  • /projects?anotherrandomhash = 1 like

Where /projects should have 3 likes.

Masthead answered 19/8, 2012 at 16:31 Comment(5)
When you say rehashed - what do you mean exactly? When I put the same Facebook share button on a page on every page of a site, when clicked it "likes" the current page.Terrijo
it likes the page fine, even the text it shows you where the page you are liking, the url is fine. It is on actual facebook that the link then gets all the other bumf added.Masthead
could you show me an example?Terrijo
@MatTaylor, are you using the code generated by facebookUnfreeze
I will be deleting the link in this comment once resolved pandaz.co.uk on most pages it is fine when you click like, when you ike the projects page and post, check your wall for the link thats being givenMasthead
B
4

Not only is it ugly, it also means that the like button is not counting for the /projects page, but the new /projects?fbcrap=WHYAREYOUHERE

Put the Open Graph meta tag for og:url into your /projects page, and have it say the page’s URL is actually http://example.com/projects, no matter what kind of query string parameters might be attached.

When Facebook’s scraper will fetch http://example.com/projects?fbcrap=WHYAREYOUHERE when this address is about to be liked, Facebook will realize that the actual address/URL is just http://example.com/projects, and it should therefor count the like for this URL and not something else.

Bakeman answered 22/8, 2012 at 9:38 Comment(2)
og:url is set on every page, direct copy from the source of /projects: <meta property="og:url" content="pandaz.co.uk/projects"> I have even got facebook to rescrape this just in caseMasthead
Bit annoyed that this was awarded as the bounty, when it has not fixed the problem.Masthead
F
0

I'm pretty sure that's intentional, the extra parameters allow you to identify which 'like' triggered the story that the (inbound) user saw, and tell you where on Facebook they saw it and clicked it.

There's documentation showing many of the possible fb_source parameters ( https://developers.facebook.com/docs/fb_source/ ) and fb_action_ids and fb_action_types contains the Open Graph action types and ids which contributed to the story the user clicked (i.e X liked Y and Z other pages on SiteName' will have multiple action IDs representing each like button clicked)

{edit} and as CBroe said, the way to fix this is to have a set of Open Graph meta tags on your site which tell Facebook the URL of the content/object itself, even when it's accessed with additional query string parameters

Flora answered 21/8, 2012 at 21:4 Comment(3)
I dont mind that being the case, but its still treating each instance of the same page (#1 the original - /page, #2 the page with parameters - /page?fbstuff=otherstuff etc) meaning that the likes are not showing correctly on the page if someone organically went to that page. Also this only seems to happen on some pages and not others!Masthead
How are you populating the canonical URL / og:url values for your pages? are you accidentally including those parameters?Flora
og:url is set on every page, direct copy from the source of /projects: <meta property="og:url" content="pandaz.co.uk/projects">; I have even got facebook to rescrape this just in caseMasthead
F
0

Looking here, it looks like you should specify the href in the like button:

<fb:like href="http://pandaz.co.uk/projects/" width="450" height="80"/>

Also, you should consider reorganizing the og: meta data on the top of the HTML, just after the title in the header.

Cheers, Apoc

Fake answered 28/8, 2012 at 18:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.