简体   繁体   中英

Facebook like button stopped working on my wordpress site

Since 2 weeks ago it worked, and still works for old urls. but now for every new post the like button remain at zero, and if i press the button it blinks 1 but go back to zero immediately.

My site: http://arielmartini.com/

An old url that (still) works: http://arielmartini.com/2011-06-30-bixiga70

A new url that no longer works: http://arielmartini.com/2011-07-02-romulo

Even if I put the url here it doesn't work (try with the 2 url above - "URL to Like" field).

It appears that you're using both the old Facebook "Share" and the newer Facebook "Like" buttons. However Facebook Share (via static.ak.fbcdn.net/connect.php/js/ is the old SDK and is being deprecated).

You'll just want to use the new SDK (which you are correctly including) at http://connect.facebook.net/en_US/all.js .

I believe removing the conflicting "share" button will solve your problem.

Looking at the url you posted, there is a javascript console error (see image) which is causing the javascript code from continuing execution.

脸书 javascript 错误

To fix it , remove this line of code from your wordpress site, or disable the plugin that is adding this line:

<script type='text/javascript' src='http://arielmartini.com/wp-content/plugins/fbconnect/fbconnect.js?pluginver=99&#038;ver=3.1.4'></script> 

You can't load both the deprecated fbconnect.js file as well as the new Facebook javascript sdk.js file that you load on line 435. If anything is relying on the old deprecated library, I would suggest upgrade as soon as possible because Facebook is killing deprecated functionality all the time.

The problem was that i didn't had open graph tags on my page. Using this plugin fixed it. You can also analyse the page using this link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM