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
Comment #1
gbangban commentedQuick Fix
Change line 220 to
elseif ($fbu && $fbu == $fb->getUser()) {
from
elseif ($fbu && $fbu == $fb->get_loggedin_user()) {
Comment #2
swe3tdave commentedi 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.
Comment #3
swe3tdave commentedthe quickfix doesn't work for me
Comment #4
jns120 commentedThanks 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
Comment #5
jns120 commentedOk, 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.
Comment #6
Dave Cohen commentedYeah, 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.
Comment #7
jns120 commentedCool, thanks for the info Dave.
Comment #8
carlmcdade commentedThe download is 120mb! That can't be right. I am trying
http://pearhub.org/get/facebook-0.1.0.tgz
Comment #10
benced commentedhey, 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
Comment #11
benced commentedComment #12
Dave Cohen commentedI've updated the readme.txt in the DRUPAL-6--2 branch.
Comment #14
njathan commentedIs 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
Comment #15
njathan commentedjust referred the README in the 2.x-dev... The instructions seem clearer there, and download (facebook-platform.tar.gz) is about 39.2 KB
Comment #16
njathan commentedComment #17
Dave Cohen commentedBlame 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.
Comment #19
ed_conolly commentedsorry posted something in totally the wrong place. Ignore this.