Facebook 'Like' Dialog Appears and Immediately Disappears
Asked Answered
P

4

6

I've been having an issue with the Facebook Like button for quite some time. I've looked all over for a solution but am quite stuck. The error occurs on my site www.MapYourVote.com. When you go to a poll page and click 'Like' the dialog appears and quickly disappears. At the same time, the counter also goes to 1 and quickly goes back to 0.

The problem is always solved for individual poll pages by using the Facebook Debug tool (http://developers.facebook.com/tools/debug). Once you use it on the url, the like button will work as expected. The issue is my website is dynamic and I can't use the Facebook Debug tool every time someone creates a new poll. The Facebook Debug tool does not reveal any problems (apart from og image size but I doubt that's the issue).

Here is an example of a page in which the Like button does not work. If you were to enter this url into the Facebook Debug tool, the Like button would work. http://www.mapyourvote.com/Poll/Election-Result-Feelings/

Any help would be much appreciated!

Prairie answered 11/11, 2012 at 15:19 Comment(0)
B
0

I also had this problem. I was constructing a referrer url to give link-sharers a credit, so there was a different url for each user that wanted to share something. The referrer link would give the user credit and redirect to the login page of my site. With this configuration, the like dialog would appear for a moment and then disappear again, unless I went to facebook's debug tool.

What fixed the problem for me was to change from a redirect to rendering the page directly from my referral link. In fact, I changed the referral link to be a ?r=refid parameter on my root page URL. It appears to work correctly if facebook doesn't have to follow a redirect to get the og: data.

Blight answered 18/12, 2012 at 16:0 Comment(0)
P
0

I had a similar problem and it turned out I had too restrictive cookie policy set in my browser - I only allowed Facebook to use 1st party cookies. When I allowed Facebook to use other cookies, the problem was solved. It's hard to debug when no error appears other than the immediate pop-up closeup.

Polyclinic answered 27/6, 2014 at 16:12 Comment(0)
L
0

I had the same problem. It was caused by url value in data-href attribute. I had there url pointing to my localhost. When I changed the url to existing one, problem was solved.

Hope it helps

Luminescent answered 18/7, 2014 at 13:48 Comment(0)
S
-1

For me, the problem (Like popup disappearing after a second) was happening when the Like button URL redirected to another URL.

The fix was to add og:type, og:url, and og:title (required per https://developers.facebook.com/docs/reference/opengraph/object-type/website), then running the URL through the Facebook debugger to clear the cache (https://developers.facebook.com/tools/debug).

More at https://mcmap.net/q/1920254/-facebook-like-button-does-not-work-on-one-website

Splash answered 16/5, 2013 at 20:45 Comment(2)
why is this (-1)? is the info inaccurate?Contrabassoon
Even after I made the above fix, the problem kept happening. I think it is because the Like button doesn't like URLs that redirect. I am working on changing our Like buttons to have URLs that don't redirect.Splash

© 2022 - 2024 — McMap. All rights reserved.