I have installed DFF correctly, enabled the modules I want and created an app on Facebook. Now when I go to add a facebook application (/admin/build/fb/fb_app_create) I enter all the correct info provided by facebook (API Key, Secret etc) but when I click save I get a page that prints this error:

Fatal error: Call to undefined method Facebook::get_loggedin_user() in /home/xxxxxx/xxxxxxxxx/modules/fb/fb.module on line 220

This is a dev site so I "x" out some of the path. I took at look at that line in fb.module and it says

" elseif ($fbu && $fbu == $fb->get_loggedin_user()) {
// Canvas page or Connect page, current user is logged in already.
// Nothing to do here.
"

Any ideas? thanks!

Comments

gbangban’s picture

Quick Fix
Change line 220 to
elseif ($fbu && $fbu == $fb->getUser()) {
from
elseif ($fbu && $fbu == $fb->get_loggedin_user()) {

swe3tdave’s picture

i have the same problem when i try to add an application, same error message... i thought it was an error with facebook.php since it was updated yesterday, but i tried with an old version and the error is still there.

swe3tdave’s picture

the quickfix doesn't work for me

jns120’s picture

Thanks gbangban but once I changed that line and tried to add an app again I now get this error after clicking save:

Fatal error: Call to a member function admin_getAppProperties() on a non-object in /home/xxxx/xxxxxxx/modules/fb/fb.admin.inc on line 152

jns120’s picture

Ok, I figured out the issue. I didn't have the correct facebook platform files on my server. I did some searching and found this:

http://github.com/facebook/platform/blob/master/clients/packages/faceboo...

Deleted the old files, uploaded the new ones, created an app and everything worked!

For those still having issues you might want to try that.

Dave Cohen’s picture

Status: Active » Fixed

Yeah, you downloaded the newer libraries. Drupal for Facebook version 3.0 will use those, eventually. Facebook neglected to implement a bunch of functions that the older library supported. So I can't simply swap in the new libs and change function names.

jns120’s picture

Cool, thanks for the info Dave.

carlmcdade’s picture

The download is 120mb! That can't be right. I am trying

http://pearhub.org/get/facebook-0.1.0.tgz

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

benced’s picture

hey, can this link be added to the documentation?

http://github.com/facebook/platform/blob/master/clients/packages/faceboo...

the link in the documentation for 6.x-2.0-rc2 is dead

benced’s picture

Status: Closed (fixed) » Active
Dave Cohen’s picture

Status: Active » Fixed

I've updated the readme.txt in the DRUPAL-6--2 branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

njathan’s picture

Is this really a 120 MB download? the last link posted here leads to such a tar file!

Can someone please revert on this?
I had found another link for the fb libraries posted here

njathan’s picture

Version: 6.x-2.0-rc1 » 6.x-2.0-rc2
Category: bug » support
Priority: Critical » Normal
Status: Closed (fixed) » Active

just referred the README in the 2.x-dev... The instructions seem clearer there, and download (facebook-platform.tar.gz) is about 39.2 KB

njathan’s picture

Status: Active » Fixed
Dave Cohen’s picture

Blame facebook for moving their old libraries and not keeping the old link alive.

I highly recommend the 3.x branch for any new development. Although its still labelled 'dev', you'll be better off because facebook has deprecated the old libraries.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ed_conolly’s picture

sorry posted something in totally the wrong place. Ignore this.