API Error Code Troubleshooting
For versions 4.0 and newer of the plugin, you should see an error message in your feed with a specific error code if a problem occurs with the API while the plugin attempts to retrieve your posts. Please see our Facebook API Error Message Reference for information on troubleshooting specific API errors.
API Error 190
One of the most common problems is that your Facebook Access Token has become invalid (API Error 190) and this can usually be resolved by reconnecting your Page or Group with these steps:
- Please go to WordPress dashboard > Facebook Feed > Settings > remove the connected account(s) by clicking the red trash icon.
- Click the Save Changes button.
- Click the Add Source button, then click the blue Connect button and go through the connection process again. When sent to Facebook, you may need to click the Edit Settings (reference) button to review your connection settings and make sure all pages you manage are selected and all permissions.
- For any existing feed or legacy feed, go to the specific feed options > Settings > Sources and select the newly connected source.
- Once your source has been added, click the Save Changes button.
Facebook Group Feeds
Please note that for Facebook Group Feeds, due to limitations in Facebook’s API, you can only display posts that were created after you added the Smash Balloon app to your group. So if you have just recently added the app and you are not seeing any posts yet, going forward the new posts should appear in your feed.
Advanced/Legacy API Troubleshooting
The information below refers to advanced troubleshooting techniques and settings available in Legacy versions of the plugin (version prior to 4.0).
If you’re not seeing any Facebook posts in your feed then the issue may be that your website isn’t currently able to connect to Facebook’s API. You can check this by going to the plugin’s Settings page and clicking on the Support tab. At the bottom of that page you’ll see a System Info section. If you scroll to the bottom of the System Info then you will see a section labeled ## FACEBOOK API RESPONSE: ## as shown below:
Please note that on older versions of the plugin you would need to click the ‘Test connection to Facebook API’ button.
If the Facebook API Response is blank and you don’t see any data then this means one of two things:
1) A security setting is blocking your site from connecting to Facebook’s API from your site/server – usually a firewall, proxy or outgoing connections tool on the server.
2) A setting on your web server is causing an issue with the method being used by the plugin to connect to Facebook
A) The first thing to try is changing the request method that the plugin uses to see whether another method works. You can change the request method by doing the following:
- Go to the following setting: Facebook Feed > Customize > Misc > Misc Settings > Request Method
- Change this to be “cURL“
- Go to the plugin’s main Facebook Feed settings page and click “Save Changes & Clear Cache“
- Check whether the feed is displaying
- If it’s not then repeat the same process but changing the Request Method setting to be “file_get_contents” and then “WP_Http“
B) If solution A doesn’t help, then the best course of action is to contact your web host support team to see whether there’s a security measure in place on your web server such as a firewall, proxy or outgoing connections tool, which may be blocking your site from connecting to https://graph.facebook.com. Most of the time it’s a simple firewall or other security setting which is blocking the connection and can be remedied easily by your hosting support team.
C) If that isn’t the case then either you or your host can check whether cURL is working correctly on your server. This can be checked by just adding the following PHP code to a PHP file on your site:
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://google.com'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $feedData = curl_exec($ch); curl_close($ch); var_dump($feedData); ?>
If it’s working correctly then you should see an HTML string of the Google home page returned. If it works then you can check the same code using the Facebook API:
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://graph.facebook.com/nike/posts?access_token=439271626171835|-V79s0TIUVsjj_5lgc6ydVvaFZ8'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $feedData = curl_exec($ch); curl_close($ch); var_dump($feedData); ?>
You see a string or JSON data returned (even if it’s a Facebook error message) – Success: Everything is working correctly
“bool(false)” is displayed – Failed: This means that your site wasn’t able to connect to the Facebook API URL
You see a blank screen or a fatal PHP error – Failed: This means that cURL isn’t enabled successfully on your server
Note, if the first test using the Google URL works successfully but the Facebook API URL does not then it means that something on your website is blocking the connection to the Facebook API.