Here is the error I get

Fatal error: Call to undefined method Facebook::getSession() in /var/www/vhosts/planestv.com/httpdocs/sites/all/modules/fbconnect/fbconnect.module on line 476

David

Comments

vectoroc’s picture

Category: bug » support
dwkitchen’s picture

With the latest library 2.1.0 i get the following message

Fatal error: Call to a member function set_use_ssl_resources() on a non-object in /var/www/vhosts/***/httpdocs/sites/all/modules/fbconnect/fbconnect.module on line 427

j0k3z’s picture

I am also getting the same error (Call to undefined method Facebook::getSession() ) when I enable 2x-dev. Completely uninstalled, cleared caches, etc and still cant get it working. Gives me a white screen and the only way to access the site is to delete the module folder.

I was using a different version of the module earlier but I completely removed / uninstalled it before even messing with 2x-dev.

j0k3z’s picture

Actually, the error I get is:

Fatal error: Call to a member function getSession() on a non-object in /modules/fbconnect/fbconnect.module on line 476

monicadear’s picture

subscribing

vectoroc’s picture

@DavidPlanesTV : I've fixed it. Already in github

Abeaudrian’s picture

Hi

I too am getting the below error, I accidentally put the API key in settings page for the module and tried changing it, I also recently installed the fb_social module.

How do I change the connect URL displayed on the settings page as well as the API key, which should have been the application ID, no matter what I do the API Key reinserts itself when the page refreshes, and the connect URL wouldn't update to reflect my new domain.

ERROR:
Fatal error: Call to a member function getSession() on a non-object in /home/public_html/mysite/sites/all/modules/fbconnect/fbconnect.module on line 476

Please advise how to resolve this and get the module working again.

Regards

Adrian

vectoroc’s picture

install last version from github

vectoroc’s picture

and say what you see on admin/reports/status page

vectoroc’s picture

@DavidPlanesTV : "Call to a member function set_use_ssl_resources() on a non-object" is fixed (again in github)

Abeaudrian’s picture

@ Vectoroc

Thanks for your prompt response.

I installed the latest version from github, activated it and it is working perfectly now, got the Application ID corrected, and the connect URL. It is now showing,
Facebook PHP sdk - 2.1.1 on the admin/reports/status page.

Regards

Adrian M

dwkitchen’s picture

Look forward to trying it.

Will report back

David

asghar’s picture

Hi guys..

I am getting this problem with white page when i click on "Administer" link

Fatal error: Call to undefined method Facebook::getSession() in /home/hello/public_html/sites/all/modules/fbconnect/fbconnect.module on line 359

Any SOLUTION ???????

vectoroc’s picture

Status: Active » Closed (duplicate)

see README

Anonymous’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Category: support » bug
Status: Closed (duplicate) » Active

Back in D7. Last comment "see README" does not help - what is the solution?

Call to undefined method Facebook::getSession() in C:\Inetpub\wwwroot\123.com\sites\all\modules\contrib\fbconnect\fbconnect.module on line 400

Using SDK 3.0.1

Anonymous’s picture

Problem is, you must use SDK version 2.1.1.

This is NOT mentioned in the README.

sathyendra’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

SDK 2.1.1 worked for me.

outliner’s picture

Thanks 2.1.1 worked for me too :)

luis_san’s picture

First: We need Drupal working again!.
=======================
in your db you need to do:

SELECT *
FROM `fb_app`

Search your active app...

UPDATE `fb_app` SET `status` = '0' WHERE `fb_app`.`fba_id` =;
Now we will have our drupal working again.

Second: We need download facebook-php-sdk into /sites/all/libraries
=========================================

3th: When we refresh page we have this error:

Failed to construct Facebook client API.: Facebook needs the CURL PHP extension. 0
Unable to get application properties. Possibly, you've given the wrong id or secret. Possibly, this server is unable to reach facebook's servers. Your application will not work properly!
Failed to get application properties (batukafb) from Facebook: Invalid API key 101
Failed to set the following properties for batukafb application. You may need to manually editing remote settings!
Array
(
[uninstall_url] => http://localhost/batuka/?q=fb_app/event/batukafb/post_remove/
[authorize_url] => http://localhost/batuka/?q=fb_app/event/batukafb/post_authorize/
[connect_url] => http://localhost/batuka/
)
Failed to set application properties on Facebook: Invalid API key 101
Failed to construct Facebook client API.: Facebook needs the CURL PHP extension. 0
Failed to construct Facebook client API.: Facebook needs the CURL PHP extension. 0
Failed to construct Facebook client API.: Facebook needs the CURL PHP extension. 0

Conclusion: Maybe our problem is we are working in localhost without CURL PHP extension.

In Ubuntu you can do:
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

regards!
luis

ebeyrent’s picture

SDK 2.1.2 works for me so far...

myhemant’s picture

Your facebook-php-sdk is not comptible with fbconnect.
pls download facebook-php-sdk from below link and use it.

http://github.com/facebook/php-sdk/tarball/v2.1.1
thanks

Jb33’s picture

the same bug with facebook sdk 3.1.1 for me.. :-(

brazorf’s picture

I am getting this error, with facebook sdk 3.1.1
And i am using fbconnect 6.x-2.x-beta1

betoaveiga’s picture

@brazorf I was having the same error... I changed a few lines and worked... I had only tested login, autologin & change of sessions. I haven't tested other functionality...
I don't know how to make patches yet so I gzipped the module with the changes if you want to try it. It's working with the last php sdk (it's already there).
Remember to clear your cache, fbconnect.js changed a little too.
Hope that helps!