Facebook点赞按钮报错及FB.Event.subscribe('edge.create')异常求助
Hey everyone, let's dig into this frustrating issue that started popping up Jan 18 at 10:00 (prior to that, everything worked perfectly from the previous day's 18:00 onwards):
Key Symptoms
- Like Button Error Loop:
- First page visit: Clicking the Like button works as expected
- Cancel the like (unlike)
- Try liking again → an error message appears immediately
- Clicking the error prompt opens a dialog showing: Action Blocked: You have been temporarily blocked from performing this action (error code: 1404078)
FB.Event.subscribe('edge.create')Failure:- On initial page load, the
edge.createevent listener doesn't fire at all when you click the Like button - After unliking and re-liking the button, the function starts working normally again
- On initial page load, the
What's Going On & How to Fix It
1. Temporary Facebook Action Block (Most Likely Culprit)
That error code 1404078 is a clear sign: Facebook's automated systems have temporarily blocked you from performing like actions. This can happen even with manual clicks if you're testing like/unlike rapidly, or if their detection thresholds shifted on Jan 18.
- Fix: Wait it out—temporary blocks usually lift in 1-24 hours depending on severity. Avoid rapid repeated like/unlike actions while testing.
2. SDK Initialization Timing Issue
If the edge.create listener is registered before the Facebook SDK finishes loading, it won't work on first page load.
- Fix: Make sure you're subscribing to the event inside the
fbAsyncInitfunction, which runs only after the SDK is fully ready. Here's a corrected snippet:window.fbAsyncInit = function() { FB.init({ appId : 'YOUR_APP_ID', xfbml : true, version : 'v18.0' // Use the latest supported version }); // Register the event listener HERE, after SDK init FB.Event.subscribe('edge.create', function(targetUrl) { console.log('User liked:', targetUrl); // Your custom logic here }); }; // Load the SDK asynchronously (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
3. Browser Cache/Extension Interference
Sometimes cached SDK files or browser extensions can mess with the button's behavior.
- Fix: Test in incognito/private mode, clear your browser's cache and cookies for Facebook and your site, and disable any ad-blockers or privacy extensions temporarily.
4. Check Facebook Platform Status
It's possible Facebook rolled out an API update or had an outage starting Jan 18.
- Fix: Verify Facebook's Developer Status page to see if there were reported issues with the Like button or Graph API around that time.
Error Screenshot Reference
内容的提问来源于stack exchange,提问作者JewonYoo

