I installed facebook autopost, drupal for facebook and other facebook modules. But I am received this error in all of these modules

Failed to find the Facebook client libraries at sites/all/libraries/facebook-php-sdk/src/facebook.php

This is already asked in Failed to find the Facebook client libraries but it doesn't answer my question. This is screenshot of the CPanel

enter image description here

The src directory is selected. As you see Facebook.php is in there, but it still reports the error. I tried to rename the Facebook.php to facebook.php Then PHP reports the error

Fatal error: Class 'Facebook' not found in /home/***/public_html/sites/all/modules/fb/fb.module on line 477

What is the problem?

  • Compare the permissions and users of that fodler and its files with another library and report back. Commented Aug 11, 2016 at 9:33
  • @NiallMurphy it is the only library in my site. But the files in the src have 0644 and the folders 0755 permission.
    – M a m a D
    Commented Aug 11, 2016 at 9:48
  • Change both to 0777 temporarily and see if the error goes away? It could still be the wrong user. If not, then it's something with the library. Commented Aug 11, 2016 at 9:55
  • 1
    drush en -y fb_autopost fb_autopost_entity fb_autopost_types && drush download-facebook-php-sdk Commented Aug 11, 2016 at 10:06
  • I got a validation error or something on first install but that drush command from the project page and a cache reset made it work. I don't think you have drush but the libraries files are from 14th Jan 2015. Commented Aug 11, 2016 at 10:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.