Drupal fbconnect: Ensure that you entered valid api keys, Call to undefined method Facebook::getSession()

3.5
Average: 3.5 (2 votes)
Your rating: None

If you install Drupal fbconnect module, you can meet two problems: Ensure that you entered valid api keys When you click App Settings in fbconnect administration, you can see this message. It's caused by missing Facebook PHP SDK.

Solution is to download it from https://github.com/…book-php-sdk:

cd sites/all/modules/fbconnect
git clone https://github.com/facebook/facebook-php-sdk facebook-php-sdk

Call to undefined method Facebook::getSession() If you have Facebook PHP SDK installed, you can get this error. It's caused by changes in Facebook API. Solution is to replace all occurences of getSession() in fbconnect module by fbUser():

cd sites/all/modules/fbconnect
grep -R "getSession()"

http://stackoverflow.com/a/8824123

Keywords: Drupal, Facebook