You are here

README.txt in Drupal for Facebook 5

Same filename in this branch
  1. 5 README.txt
  2. 5 themes/README.txt
Same filename and directory in other branches
  1. 5.2 README.txt
  2. 6.3 README.txt
  3. 6.2 README.txt
  4. 7.4 README.txt
  5. 7.3 README.txt
Drupal for Facebook
-------------------

More information: http://www.drupalforfacebook.org, http://drupal.org/project/fb

Primary author and maintainer: Dave Cohen (http://www.dave-cohen.com/contact)

Version: DRUPAL-5 ($Id$)
Please read http://drupal.org/node/288721#version and confirm that
you are using the correct version.

Installation and setup documentation now available online
http://drupal.org/node/195035.  (Consult this README first, as it
contains version-specific information.  Then consult the online
documentation for more detailed instructions.)

To install:

- Link or move the contents of ./themes/ into a Drupal themes
  directory.  (The themes are so closely associated with the modules
  that it seemed appropriate to include them here, rather than
  download seperately.)

- Download the facebook-platform PHP code from developer.facebook.com.
  Extract it into the 'modules/fb' directory, so you have
  modules/fb/facebook-application/

wget http://developers.facebook.com/clientlibs/facebook-platform.tar.gz
tar xvzf facebook-platform.tar.gz
  
  Extract the client API for PHP4, and simplexml, as instructed by
  Facebook.  Or, if you want to use PHP5 API, set
  $conf['fb_use_php4_api'] = FALSE in your settings.php.  Note that
  you may encounter uncaught exceptions using the PHP5 API.

- Edit your settings.php file (sites/default/settings.php, depending
  on your install) to include settings.inc (in this directory).  For
  example:

require_once "profiles/custom/modules/fb/fb_settings.inc";

  (Or whatever path is appropriate, could be
  "sites/all/modules/fb/fb_settings.inc")

- Enable the Facebook modules via the drupal admin pages, as usual.
  You must enable at least fb.module and fb_app.module.  You will
  probably want to enable fb_user and more of the modules as your App
  needs them.

- It is highly recommended that you enable clean URLs.  If you don't,
  some links that drupal creates will not work properly on canvas
  pages.

- Create a Facebook Application (under "create content").  You will
  have to create the application on Facebook.com first, to get the
  secret and api key fields.  Then fill those values into the form on
  Drupal.  It will suggest a callback URL for you to use.  Go back to
  the form on facebook and fill the callback URL field in.





Troubleshooting:
---------------

If you get an error along the lines of "FacebookRestClient" not found,
check the facebook-platform/client/facebook.php for an include like
so:

include_once $_SERVER['PHP_ROOT'].'/lib/api/client/php_1_1/facebookapi_php5_restlib.php';

You will need to either install faceboook-platform in this location, or patch the file to read more like:

require_once 'facebookapi_php5_restlib.php';



If you see FBML Error (line 62): illegal tag "body" under "fb:canvas",
or many "CSS Errors", visit ?q=admin/build/themes.  Make sure you see
fb_fbml in the list.  It is not necessary to enable fb_fml, however
you must hit submit (even with no changes) just to get Drupal to
refresh its list of where the themes are located.

If you _still_ see CSS Errors or HTML Errors, most likely the fb_fbml
theme is still not being used.  This can happen if the theme is
initialized before fb.module is initialized.  To avoid this, don't
have any code directly in your .module files, put that code in
hook_init instead.  And if still necessary, lower the weight of the fb
module in your system table.  See http://drupal.org/node/187868

If you see "The page you requested was not found."  Make sure the
canvas page you specified agrees exactly with the canvas page assigned
by facebook.  Note also that facebook will make all letters lower case
even if you typed them upper.

File

README.txt
View source
  1. Drupal for Facebook
  2. -------------------
  3. More information: http://www.drupalforfacebook.org, http://drupal.org/project/fb
  4. Primary author and maintainer: Dave Cohen (http://www.dave-cohen.com/contact)
  5. Version: DRUPAL-5 ($Id$)
  6. Please read http://drupal.org/node/288721#version and confirm that
  7. you are using the correct version.
  8. Installation and setup documentation now available online
  9. http://drupal.org/node/195035. (Consult this README first, as it
  10. contains version-specific information. Then consult the online
  11. documentation for more detailed instructions.)
  12. To install:
  13. - Link or move the contents of ./themes/ into a Drupal themes
  14. directory. (The themes are so closely associated with the modules
  15. that it seemed appropriate to include them here, rather than
  16. download seperately.)
  17. - Download the facebook-platform PHP code from developer.facebook.com.
  18. Extract it into the 'modules/fb' directory, so you have
  19. modules/fb/facebook-application/
  20. wget http://developers.facebook.com/clientlibs/facebook-platform.tar.gz
  21. tar xvzf facebook-platform.tar.gz
  22. Extract the client API for PHP4, and simplexml, as instructed by
  23. Facebook. Or, if you want to use PHP5 API, set
  24. $conf['fb_use_php4_api'] = FALSE in your settings.php. Note that
  25. you may encounter uncaught exceptions using the PHP5 API.
  26. - Edit your settings.php file (sites/default/settings.php, depending
  27. on your install) to include settings.inc (in this directory). For
  28. example:
  29. require_once "profiles/custom/modules/fb/fb_settings.inc";
  30. (Or whatever path is appropriate, could be
  31. "sites/all/modules/fb/fb_settings.inc")
  32. - Enable the Facebook modules via the drupal admin pages, as usual.
  33. You must enable at least fb.module and fb_app.module. You will
  34. probably want to enable fb_user and more of the modules as your App
  35. needs them.
  36. - It is highly recommended that you enable clean URLs. If you don't,
  37. some links that drupal creates will not work properly on canvas
  38. pages.
  39. - Create a Facebook Application (under "create content"). You will
  40. have to create the application on Facebook.com first, to get the
  41. secret and api key fields. Then fill those values into the form on
  42. Drupal. It will suggest a callback URL for you to use. Go back to
  43. the form on facebook and fill the callback URL field in.
  44. Troubleshooting:
  45. ---------------
  46. If you get an error along the lines of "FacebookRestClient" not found,
  47. check the facebook-platform/client/facebook.php for an include like
  48. so:
  49. include_once $_SERVER['PHP_ROOT'].'/lib/api/client/php_1_1/facebookapi_php5_restlib.php';
  50. You will need to either install faceboook-platform in this location, or patch the file to read more like:
  51. require_once 'facebookapi_php5_restlib.php';
  52. If you see FBML Error (line 62): illegal tag "body" under "fb:canvas",
  53. or many "CSS Errors", visit ?q=admin/build/themes. Make sure you see
  54. fb_fbml in the list. It is not necessary to enable fb_fml, however
  55. you must hit submit (even with no changes) just to get Drupal to
  56. refresh its list of where the themes are located.
  57. If you _still_ see CSS Errors or HTML Errors, most likely the fb_fbml
  58. theme is still not being used. This can happen if the theme is
  59. initialized before fb.module is initialized. To avoid this, don't
  60. have any code directly in your .module files, put that code in
  61. hook_init instead. And if still necessary, lower the weight of the fb
  62. module in your system table. See http://drupal.org/node/187868
  63. If you see "The page you requested was not found." Make sure the
  64. canvas page you specified agrees exactly with the canvas page assigned
  65. by facebook. Note also that facebook will make all letters lower case
  66. even if you typed them upper.