Facebook like button counting problem - facebook

I have installed facebook like button with javascript solution.
I left the href attribute empty so it will use the current url for counting. It seems that right now , even after changing the href attribute , facebook is counting the like on my entire website.
Example:
1. domain.com/fb_url
2. domain.com/fb_url2
If you will like the first url , you will be able to see the likes on the second url.

Why not putting into the href attribute the absolute URL of the page? I guess this will fix the issue. This can be easily achieved in whatever language you use. Please post the code you are using so that we can provide further help.

If you used og:url tag, you although have to change it on each page.

Related

Facebook like is broken, adds a trailing # to the final url

I'm running my site on Cargo Collective and trying to have likes per page. I cannot modify the code in the head tag only within the body tag.
When i debug a page i get the following;
Response Code 206
Fetched URL http://www.iamneuron.com/Break-this
Canonical URL http://www.iamneuron.com/Break-this
URL for Likes http://www.iamneuron.com/#Break-this
Final URL http://www.iamneuron.com/#Break-this
I can't figure this out and i have been searching for a while now. Even if i explicitly specify the url rather than leaving the code to figure it out, facebook still adjusts the url to one that doesn't work with the trailing #.
Originally i was trying to create the like code via facebook but i have now switched to this which works better with cargo but still produces the same error:
http://randomcodescraps.tumblr.com/post/1363402555/js-dynamic-like-button-on-cargo-collective-projects
Anybody any ideas? Thanks in advance btw!
Your page doesn't have any OG tags that Facebook can use. And those that are in your page are commented out. Add proper OG tags and then use the link tool to check you tags and see if still have the same problem.

Share anchor links

I want to make a button that shares links in this form:
http://example.com/#anchor
but when i click it, it shares only
http://example.com
How could I make it share what I want?
This is very simple; your URL string you want to share should be like this: http://www.domain.com/hello.html%23myanchor
The %23 will be transformed by Facebook into a #.
Your question is not very detailed and it's not easy to understand exactly what it is you're asking for..
Since the share functionaliy was deprecated I assume that you are talking about the Like button.
As you can see in that page you can put what ever url you want into the "URL to Like" field, then click the "Get Code" button and use that code in your page.
You can put the code in any page, so if your page is: "example.com/#anchor" you can still have the button like "http://example.com" or the other way around.
If however you want the user to like "example.com/#anchor" but when someone clicks on the liked link he will get to "example.com" then it's not possible.
I just thought about this (because I have the same problem).
My idea is to share a php link with a variable, let's call it 'a' for anchor, which is the anchor without # so that facebook won't remore it.
Thus you share the link:
http://www.mywebpa.ge/?a=anchor1
Then you just have to recover the value of 'a' with php and add a little script which makes you go to the anchor.
I hope it will help you.
Regards

How do I add a referral variable to an AddThis URL without resetting the count?

for my project I need to be able to add a referral variable (something like ?ref=xxxx) to URLs shared via AddThis.
However, by adding the variable and changing the URL, the "count" displayed on the tool resets .
So does anyone out there have a solution to use AddThis to share URLs with variables on them, without resetting the "count" displayed to the user?
Thank you all so much for your time!
I had a similar problem.
So, you can use fb_ref parameter: https://developers.facebook.com/docs/reference/plugins/like/
In the AddThis you need to use the following format: fb:like:fb_ref
AddThis Support ticket: http://support.addthis.com/customer/portal/questions/1127049-facebook-data-ref
You can do this via the ref attribute on the Like button. See the ref attribute here: https://developers.facebook.com/docs/reference/plugins/like/
However, I'm currently looking for how to implement this via AddThis. I'll post here if/when I find a solution.

The title, link and description don't work

I've been reading guides and examples for a long time (hours) but I can't manage. I tried to use all html meta tag like title, description, and og:property. Also tried to use the link sharer and also to create a new blank page with just the info I want to share to facebook in order to test. Also I tried to generate an random url in php so to have always a different url variable (the url to share and also the url of the main page containing the script). I also grabbed (url linter) a lot of time the url to clean the cache of facebook. It always give me the title of the site domain as title or the url itself as the shared title and description. I don't know what to do.
The main web site is from joomla. In the code of index of joomla I put a php include if the url has the variable "articolo" id. This incuded php page has regulat head body etc. So maybe I facebook check the main meta of joomla first? So now I tried to open a popup with just the page for sharing. Look here: link
It's possible that the title is locked in, meaning that after X number of likes Facebook doesn't allow you to change it anymore. Can you give us an example URL you're having issues with?
EDIT
Ok, now the link you provided shows some very interesting output. http://modernolatina.it/wjs/index.php?option=com_content&view=article&id=96&Itemid=258&autore=6&articolo=6
First, you webserver, instead of sending back a 200 code, is sending back a 500 code.
Secondly the HTML your webserver is sending back has two HTML tags (Do a view source on the content returned)
Fix up those two issues and I think the linter will be happier with your page.
Test your page here:
http://developers.facebook.com/tools/debug

facebook sharer og:url content not displayed after share

I have set the meta tags as shown in the example
Everything works fine, except the og:url tag. Before i hit the share button, it's displaying the correct url as set in the tag. But after I hit the share button, the shared message display the domain name of the site instead. So for example if I set the og:url as www.helloworld.com/hellouniverse, the shared message (this can be seen after i hit share) will instead display www.helloworld.com.
Does anyone probably have any idea how to fix this ?
Thanks
As far as I know, this is the default behavior of facebook, they take the domain name from the og:url parameter and display it.
I've tried several approaches to deal with it, but eventually came up with nothing.
Because it is their internal script, there isn't much you can do about it.