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.
Still have questions? We are here to help you succeed.Open a support ticket