Someone asked me to add a facebook connect login to their drupal site, unfortunately I've never used drupal before and I'm having issues.

I've been following the instructions in the readme for setting up this module, I was doing good until I got to:
"5. Enter the Connect URL on Connect settings tab (e.g. copy value from admin/settings/fbconnect field “Connect url”)."
There doesn't seem to be a connect settings tab in the apps anymore so I just guessed it was the "Site URL" in the "Web Site" tab.

Then I got step 7:
"7. Configure the module through the Fbconnect module (admin/settings/fbconnect) using the information provided by Facebook
(API key, Secret API key). If you are unsure what to do on tab App Settings just press the Save configuration button."
And I copied the app id, and app secret, but when I click the app settings tab in drupal it tells me "Ensure that you entered valid api keys." I know they are correct. I found an issue on here where a guy re-installed his module and that worked for him, but it did not work for me.

So yeah, any tips on how to get this working? I am really confused, it took me forever just to find the page.tpl.php for step 8 because I didn't know drupal kept themes in two places, so it's entirely possible it's something really simple.

Thanks for any help anyone is able to provide.

Comments

sukr_s’s picture

note you should use the FB AppId and not API key. use the appid and secret key.

nkalush’s picture

Thanks for the reply,
I have been using the appid, there's a message below the input box saying which one to use even though the readme is wrong.

theatereleven’s picture

I'd love to know how you even get this to print on the Drupal site. I've got my App ID and all that done, but cannot print it anywhere in my theme.

bananazz’s picture

This is a royal pain, i have installed everything the way it should and keep getting the "Ensure that you entered valid api keys." error.

sukr_s’s picture

have you downloaded the fb php sdk. you need to download it from http://github.com/facebook/php-sdk/? see the readme.txt

nkalush’s picture

Thanks sukr_s, that is probably my main problem, I've installed it to the module directory like it asks to do in the readme, and when I go to /modules/fbconnect/facebook-php-sdk/src/facebook.php file it shows a blank page as opposed to a 404, so I'm guessing it's accessible. However when I check /admin/reports/status it's telling me it can't find the facebook php sdk, do I have to tell the plugin that it is in the module directory somehow?

nkalush’s picture

@bananazz
Checking /admin/reports/status told me what I was doing wrong, maybe that would help you too.

sukr_s’s picture

running out of ideas, did you check the permissions on the fb sdk folder & files (on linux/ubuntu). they need to have the same permissions as the fbconnect module.

ducdebreme’s picture

I solved my problem. This is how:

First I had the SDK at this path
sites/all/fbconnect/facebook-php-sdk
but my site got a white screen and an error in the Apache error-log:
PHP Fatal error: Call to undefined method Facebook::getSession

Then I found a hint to move the SDK to
sites/all/fbconnect/php-sdk
But now I in fbconnect's admin section got the error message "Ensure that you entered valid api keys"
and in Drupal's status report I found "Facebook PHP library not found"

I could solve the problem by setting a symbolic link
ln -s php-sdk facebook-php-sdk

Now I have this dirs with SDK
sites/all/fbconnect/php-sdk
sites/all/fbconnect/facebook-php-sdk

ducdebreme’s picture

Sorry, I was too fast.
It's not working

New solution I really had to use SDK version 2.1.1 from http://github.com/facebook/php-sdk/tarball/v2.1.1 - this worked immediately!

rehanz’s picture

did anyone manage to het this to actually work ??, ive been trying for a few days and nothings happening for me.

Anonymous’s picture

Absolutely fantastic! This worked for me! (response #10)
Thanks

hacmx’s picture

Please update module to support last facebook sdk version...
thanks!

druper’s picture

That (#10) was so totally it, ducdebreme. Thanks for digging that out. I was getting the blank page syndrome too but it was also bringing the whole site down!

salientknight’s picture

Worked on one site... with the code in libraries/facebook-php-sdk/facebook.php
Does not seem to work in any way on another site... copied the install code from the working site.

salientknight’s picture

What path did you wind up with?

mrjeeves’s picture

+1 for comment #10, that did it for me too

natanaugusto’s picture

Issue summary: View changes

I just commented the line relative to "$libraries['facebook-php-sdk']['version arguments']['lines'] = 10" on fbconnect_libraries_info.
The argument 'lines' limits the number of lines to search for the pattern. The default value is 20.

roblog’s picture

Hurray .. I finally got this to install using the latest dev version. The trick was to get the right sdk .. as specified in
the fbconnect.module file under the fbconnect_libraries_info() function:

https://github.com/facebook/facebook-php-sdk-v4/archive/4.0-dev.zip

Phew!

gobinathm’s picture

Status: Active » Closed (outdated)

Closing the issue. It was inactive for a long time & it's related to a Drupal Version which is not supported anymore