After setting up the application on facebook and configuring at 'Fbconnect settings'

I get this error:

Fatal error: Class 'Facebook' not found in /usr/www/users/forsker/sites/all/modules/fbconnect/fbconnect.module on line 569

My PHP version is 5.2.8

Comments

mitchjaz’s picture

I have the identical problem.

LaNets’s picture

Status: Fixed » Patch (to be ported)

Sorry,

I forgot to mention in the readme.txt that you need to download the facebook PHP library at http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platf... and put all the content of the php subfolder into the fbconnect/facebook-client subfolder .

It should looks like this :
your_path_to_modules_/fbconnect/facebook-client/facebook.php
your_path_to_modules_/fbconnect/facebook-client/facebookapi_php5_restlib.php
your_path_to_modules_/fbconnect/facebook-client/jsonwrapper/jsonwrapper.php
your_path_to_modules_/fbconnect/facebook-client/jsonwrapper/jsonwrapper_inner.php
your_path_to_modules_/fbconnect/facebook-client/jsonwrapper/JSON/JSON.php

I didn't include it into this module because it breaks GNU GPL licence.

I will add this information in the next release and will also display a cleaner error message when the file is missing.

LaNets’s picture

Assigned: Unassigned » LaNets
Status: Active » Fixed

Fixed in Beta3 version

poundy’s picture

I got this error:

warning: include_once(facebookapi_php5_restlib.php) [function.include-once]: failed to open stream: No such file or directory in /home/goegghea/public_html/beta/sites/all/modules/fbconnect/facebook-client/facebook.php on line 34.
warning: include_once() [function.include]: Failed opening 'facebookapi_php5_restlib.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/goegghea/public_html/beta/sites/all/modules/fbconnect/facebook-client/facebook.php on line 34.

I downloaded the facebook php library and place the facebook-platform folder in the fconnect folder with the facebook.php file in the facebook-client.

any ideas how to solve that issue?

LaNets’s picture

In the facebook-platform folder, there are a subfolder named php, just put all the content of the php folder into facebook-client folder.

poundy’s picture

Status: Patch (to be ported) » Fixed

I figured out the issue. I needed to place the facebook.php, jsonwrapper, facebookapi_php5_restlib.php in the facebook-client folder. it works great now. Awesome module!

namzezam’s picture

This is security issue. I put here just for handing it to the others!
It should have better place.

The last line in modules/fbconnect/js/FeatureLoader.js must be commented out!

It produces infinite access to static.ak.fbcdn.net. Googling static.ak.fbcdn.net give smell of fishing any way you look on it! Before commenting it out: Any way with allowing java script on the druapl site result in said infinite loop of accessing to static.ak.fbcdn.net or com.

After commenting this line out all run ok, except of the logging out from user being logged in by fb and unless clearing private data (that is in firefox), in which case the logging out is not performed.

Here is that strange line which i commented out:

FB.Bootstrap.loadResourceMaps({"Base":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z88Z2\/lpkg\/br34ulub\/fr_FR\/141\/134772\/js\/connect.js.pkg.php","dependencies":null},"Common":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z88Z2\/lpkg\/br34ulub\/fr_FR\/141\/134772\/js\/connect.js.pkg.php","dependencies":["Base"]},"XdComm":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z88Z2\/lpkg\/br34ulub\/fr_FR\/141\/134772\/js\/connect.js.pkg.php","dependencies":["Common"]},"CacheData":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z8H9R\/l\/ck0tst4k\/nu_ll\/117867\/js\/api_lib\/v0.4\/CacheData.js","dependencies":["Common","XdComm"]},"Api":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z88Z2\/lpkg\/br34ulub\/fr_FR\/141\/134772\/js\/connect.js.pkg.php","dependencies":["XdComm"]},"CanvasUtil":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z88Z2\/lpkg\/br34ulub\/fr_FR\/141\/134772\/js\/connect.js.pkg.php","dependencies":["Common","XdComm"]},"Connect":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z88Z2\/lpkg\/br34ulub\/fr_FR\/141\/134772\/js\/connect.js.pkg.php","dependencies":["CanvasUtil","Api"],"styleSheets":["http:\/\/static.ak.fbcdn.net\/rsrc.php\/z25ED\/l\/rjn5h2zn\/fr_FR\/132011\/css\/fb_connect.css"]},"XFBML":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z88Z2\/lpkg\/br34ulub\/fr_FR\/141\/134772\/js\/connect.js.pkg.php","dependencies":["CanvasUtil","Api","Connect"]},"Integration":{"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z5TFV\/l\/d2moxi08\/nu_ll\/132011\/js\/api_lib\/v0.4\/Integration.js","dependencies":["Connect"]}}, {"base_url_format":"http:\/\/{0}.facebook.com\/","api_channel":133168,"api_server":133168,"www_channel":132011,"xd_comm_swf_url":"http:\/\/static.ak.fbcdn.net\/swf\/XdComm.swf?6:132011","login_img_dark_small_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_dark_small_short.gif?6:121638","login_img_dark_medium_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_dark_medium_short.gif?6:121638","login_img_dark_medium_long":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_dark_medium_long.gif?6:121638","login_img_dark_large_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_dark_large_short.gif?6:121776","login_img_dark_large_long":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_dark_large_long.gif?6:121638","login_img_light_small_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_light_small_short.gif?6:121638","login_img_light_medium_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_light_medium_short.gif?6:121776","login_img_light_medium_long":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_light_medium_long.gif?6:121776","login_img_light_large_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_light_large_short.gif?6:121776","login_img_light_large_long":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_light_large_long.gif?6:121638","login_img_white_small_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_white_small_short.gif?6:121638","login_img_white_medium_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_white_medium_short.gif?6:121638","login_img_white_medium_long":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_white_medium_long.gif?6:121638","login_img_white_large_short":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_white_large_short.gif?6:121638","login_img_white_large_long":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/login-buttons\/connect_white_large_long.gif?6:121638","logout_img_small":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/logout-buttons\/logout_small.gif?6:132011","logout_img_medium":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/logout-buttons\/logout_medium.gif?6:132011","logout_img_large":"http:\/\/static.ak.fbcdn.net\/images\/fbconnect\/logout-buttons\/logout_large.gif?6:132011"});

Status: Fixed » Closed (fixed)

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