Hey guys,

I just installed this module for my website, it's cool, but it doesn't work. I copied the PHP files from Facebook to the facebook-client folder but the module keeps complaining:
Fbconnect : Facebook PHP library file facebook.php not found see readme.txt

Clearly I did.

Here's how my hive looks like:
/public_html/modules/fbconnect/facebook-client/README.TXT
/public_html/modules/fbconnect/facebook-client/jsonwrapper
/public_html/modules/fbconnect/facebook-client/facebookapi_php5_reslib.php
/public_html/modules/fbconnect/facebook-client/facebook.php
/public_html/modules/fbconnect/facebook-client/facebook_desktop.php

Help?

Thanks,
deltatux

Comments

deltatux’s picture

Category: support » bug

Alright, there's no fix to this so far. Please help!

The SVN download happened on February 17, 2009.

Changed to a bug report.

Thanks,
deltatux

nimzie’s picture

I'm in the same boat.

Subscribed.

randallknutson’s picture

you should install fbconnect to sites/all/modules/ not modules/

Randall

jimcaruso’s picture

[Edit: Well, this made the error "Facebook PHP library file facebook.php not found see readme.txt," disappear for a while - but the error is back not, so my site still has an issue.]

The missing PHP file is in the "facebook-platform" folder, which you place in the "fbconnect" module folder. This is not explicit in the README.TXT file. So, it ends up as sites/all/modules/fbconnect/face-book-platform.

fehin’s picture

I have this problem too. I even moved facebook.php to the module root directory and still got that message. I guess I have to disable it until a solution to this is found.

pyrello’s picture

Subscribing.

redhatmatt’s picture

Fbconnect : Facebook PHP library file facebook.php not found see readme.txt

Yes, I read the README.TXT slowly and thoroughly (3 times), and everything else pretty much works.

CuRL is enabled.

No, I am not some n00b that put the modules in the root modules.

Yes, I tried all of your suggestions in the README as far as what entries to put in settings.php

I also attempted moving the files in multiple locations within fb AND fbconnect as I read (probably rumor dribble/ misinformation) someone had some success with facebook.php needing to reside in fbconnect folder vs. what instructions say... (yeah, I doubt that's it either.)

I am on a MediaTemple DV that I have like ever had zero anything really setup wrong, and I do some pretty crazy configs with Drupal.

My point is there has been like no help for these people on the thread and if you type "Fbconnect : Facebook PHP library file facebook.php not found see readme.txt" into google you'll see it's on lots of sites.

So what's up?? How bout a suggestion or two, this is not a niche problem...

Please?

redhatmatt’s picture

Ok so when I finally submitted the previous complaint I went to submit the same to the fb issue thread, which got me thinking, "Gee, I should check and see if there is a README in the fbconnect folder."

Low and behold, there is the answer, sheesh, the human mind...

-- INSTALLATION --
1. Upload the 'fbconnect' folder into your module directory,
2. Download the Facebook PHP libraries from http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platf....
Copy the facebook-platform/php folder content to the facebook-client directory.

(What was not in the README but is fairly obvious.)
Then clear ALL your Drupal Caches: if you don't already know the way through the admin menu (that I cannot live without, heh...) then:
install the devel.module and use its clear cache feature.

This should take care of this problem....

Double "sheesh" - I feel dumb... got all fired up 'cause I read the wrong file 3 times. Funny.

pyrello’s picture

Yeah, clearing the caches did not do it for me. Is there some requirement to put this in the /modules folder? Or can it be placed in the sites/all/modules folder? Also, should facebook-platform/php be placed in the facebook-client folder or should the php folder from the facebook-platform folder be placed in the facebook-client folder?

I am working with a fresh 6.x install and I have tried putting the fbconnect folder into both of the above mentioned module folders. I have tried flushing the cache after everything I do. I can't seem to get this thing figured out.

What am I doing wrong? Please help.

pyrello’s picture

Okay, I figured out my issues.

You have to move the contents of the facebook-platform/php folder (facebook.php, etc.) to the facebook-client folder. It is not clear from the README file that this is what you are supposed to do. Move the files, flush the cache and boom... you're in business!

I had to look in fbconnect.module to figure out where it was looking for the files. It does not scan for them like some modules do.

Please disregard my previously frustrated-sounding comments.

fehin’s picture

For clarification purpose, the poster above me meant place the content of the php folder that is in facebook-client folder here: fbconnect\facebook-client instead of fbconnect\facebook-client\php. This worked for me.

my.wahyu’s picture

I like this modules..
but when I install appear "# Fbconnect : Facebook PHP library file facebook.php not found see readme.txt"
I prefer to delete this module...

for alternative you can use "facebook badge" from your facebook app.. and mount it in your html template

budda’s picture

Status: Active » Fixed

README.txt was pretty clear to me in beta7. Worked first time from a fresh install. So setting to closed as it appears to be user error from not reading.

Status: Fixed » Closed (fixed)

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

xrampage16’s picture

The easiest way to fix this is to edit the facebook.module file and edit line 508

In the facebook_client() function, change

$lib_path = drupal_get_path('module', 'fbconnect') .'/facebook-client/';

to

$lib_path = drupal_get_path('module', 'fbconnect') .'/facebook-client/php/';

It's looking for the files in the wrong spot. Well, at least looking in the wrong spot compared to the install instructions.

If you do this, then the install instructions will work properly.

snorkers’s picture

I just downloaded beta7 and was confused over this - the readme was a little vague over the directory structure of the FB PHP libaries. However, now got it working thanks to reading all the above posts:

1. The fbconnect module can go in either sites/all/modules or sites/multisite/modules. This does work for multisite installations
2. The contents of the facebook-platform/php folder go to fbconnect/facebook-client/ folder; eg, you should have the following path if installing to sites/all: sites/all/modules/fbconnect/facebook-client/facebook.php
3. You must flush caches

I wouldn't recommend tweaking the fbconnect module as recommended at #15 - as soon as an update is installed, fbc won't work again (and remember - don't overwrite the complete fbconnect folder when you upload an update, as you will lose your FB PHP library).

tomstaelens’s picture

thanks snorkers! just coppying the content of "sites/all/modules/fbconnect/facebook-client/php" to "sites/all/modules/fbconnect/facebook-client/" helpt me solve the problem )
thx!

dgarzila’s picture

Thank you ... this thread helped me a lot..... now people will be screaming for my websites....

schnakboy’s picture

did anyone else get this error msg:

Warning: Unterminated comment starting line 1625 in /home/content/d/i/g/digthebasics/html/dwrtdraft/sites/all/modules/fbconnect/facebook-client/facebookapi_php5_restlib.php on line 1625

Parse error: syntax error, unexpected $end, expecting T_FUNCTION in /home/content/d/i/g/digthebasics/html/dwrtdraft/sites/all/modules/fbconnect/facebook-client/facebookapi_php5_restlib.php on line 1625

as instructed, i transferred the files from the php folder to the facebook-client folder and this error popped up with the white screen of death.

i might just resort to using the facebook badge instead for the moment.

help please ..

lishevita’s picture

I'm not having the facebook.php problem but a facebook_desktop.php problem...

Fbconnect : Facebook PHP library file sites/all/modules/fbconnect/facebook-client/facebook_desktop.php

Thing is, I DID download and unpack the facebook php library into the right place, bu there is no facebook_desktop.php in that tarball. At all.

Ummmmm.... did that file get nuked out of the php library's svn? I'm a bit stumped as to what to do now.

Anonymous’s picture

lishevita, Check this post http://drupal.org/node/691824. Current hosted facebook platform file only contain facebook.php for some reason. Although you may already have found the solution I posted it for any future reader's use. In comment #3, all files needed are attached.

stemount’s picture

tip: Download https://github.com/facebook/facebook-php-sdk into sites/all/libraries/facebook-php-sdk

Command Line
cd /your_site_root/sites/all/libraries/
git clone git@github.com:facebook/facebook-php-sdk.git