You are here

README.txt in Drupal for Facebook 5.2

Same filename in this branch
  1. 5.2 README.txt
  2. 5.2 themes/README.txt
Same filename and directory in other branches
  1. 5 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--2 (version 2.x for Drupal 5.x)
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.  (Read this README.txt first, as it
contains the most up-to-date information.  Then consult the online
documentation for more detailed instructions.)

To install or upgrade from an earlier version of Drupal for Facebook:
   
- Make sure you have an up-to-date PHP client from facebook.  You may
  download a tarball,
  http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz,
  or do this with subversion: 
  svn co http://svn.facebook.com/svnroot/platform/clients/php/trunk

- If you extract facebook-platform.tar.gz into your modules/fb
  directory, it should be found automatically.  If this is not the
  case, set a drupal variable, 'fb_api_file', to the location of
  facebook.php.  For example, if you checked the libs out of
  subversion, add 
  $conf['fb_api_file'] = 'sites/all/modules/fb/facebook-platform/facebook.php'; 
  near the end of your settings.php.
  If you downloaded the bundle, this might work:
  $conf['fb_api_file'] = 'sites/all/modules/fb/facebook-platform/php/facebook.php'; 
  Customize the path above as needed for your installation.

- If you intend to support canvas pages, install a Facebook-aware
  theme into one of Drupal's themes directories.  One example theme is
  provided in the 'themes' directory of this module, but Drupal will
  not find it there.  So, you must copy the entire theme directory to
  sites/all/themes, or another of Drupal's themes directories.  Use a
  symbolic link, rather than copy, if you intend to make no changes
  and you want updates to be easier.  Visit Site Building >> Themes so
  that Drupal will detect the new theme.

- Edit your settings.php file (sites/default/settings.php, depending
  on your install) to include fb_settings.inc (in this directory).
  For example, add this at the very end of your settings.php:

  require_once "sites/all/modules/fb/fb_settings.inc";

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

  See the end of this file for other configuration you may add to
  settings.php.

- Enable the Facebook modules via the drupal admin pages, as usual.
  You must enable at least "DFF Facebook API" and "DFF Applications"
  modules.  You will probably want to enable "DFF User Management" and
  more of the modules as your App needs them.  Enable "DFF Canvas
  Pages" if you support canvas pages.  Enable "DFF Connect" for
  Facebook Connect features.  During development, the "DFF Devel"
  module is a must.

- You must enable clean URLs.  If you don't, some links that drupal
  creates will not work properly on canvas pages.

- Create an application on Facebook, currently at
  http://www.facebook.com/developers/editapp.php?new.  Fill in the
  minimum required to get an apikey and secret.  If supporting canvas
  pages, get a canvas name, too.

- Go to Create Content >> Facebook Application.  Use the apikey and
  secret that Facebook has shown you.  If you have any trouble with
  the other fields, use Facebook's documentation to figure it out.
  When you submit your changes, Drupal for Facebook will automatically
  set the callback URL and some other properties which help it work
  properly.

- If upgrading from an earlier Drupal for Facebook, revisit all of the
  Facebook Application nodes.  Edit each one, look over all the
  settings as many have changed, especially the choices under user
  management.  You'll have to submit your changes in order for your
  application to work properly with the new Facebook API.

- This patch is required for Drupal 5.x: http://drupal.org/node/241878

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

Reread this file and follow instructions carefully.

Enable the devel module, http://drupal.org/project/devel.

Enable the "DFF Devel" module and add the block it provides to the footer
of your Facebook theme.

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 that initializes a theme 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.

Bug reports and feature requests may be submitted.  
Here's an idea: check the issue queue before you submit
(http://drupal.org/project/issues/fb).  

If you do submit an issue, start the description with "I read the
README.txt from start to finish," and you will get a faster, more
thoughtful response.  Seriously, prove that you read this far.

Here is one way to set up your settings.php.  Add the PHP shown below
to the very end of your settings.php, and modify the paths accordingly
(i.e. where I use "profiles/custom/modules/fb", you might use
"sites/all/modules/fb").

<?php

/**
 * Common settings for DFF 
 */

if (!is_array($conf))
  $conf = array();

$conf['fb_verbose'] = TRUE; // debug output
$conf['fb_actions_verbose'] = TRUE; // more debug output
//$conf['fb_debug'] = TRUE; // Output from facebook's API.
//$conf['fb_api_file'] = 'facebook-platform/php/facebook.php'; // default is 'facebook-platform/php/facebook.php'

/**
 * Enable Drupal for Facebook.  Sets up custom_url_rewrite and session
 * handling required for canvas pages and callbacks from facebook servers.
 */
include "sites/all/modules/fb/fb_settings.inc";


?>

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--2 (version 2.x for Drupal 5.x)
  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. (Read this README.txt first, as it
  10. contains the most up-to-date information. Then consult the online
  11. documentation for more detailed instructions.)
  12. To install or upgrade from an earlier version of Drupal for Facebook:
  13. - Make sure you have an up-to-date PHP client from facebook. You may
  14. download a tarball,
  15. http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz,
  16. or do this with subversion:
  17. svn co http://svn.facebook.com/svnroot/platform/clients/php/trunk
  18. - If you extract facebook-platform.tar.gz into your modules/fb
  19. directory, it should be found automatically. If this is not the
  20. case, set a drupal variable, 'fb_api_file', to the location of
  21. facebook.php. For example, if you checked the libs out of
  22. subversion, add
  23. $conf['fb_api_file'] = 'sites/all/modules/fb/facebook-platform/facebook.php';
  24. near the end of your settings.php.
  25. If you downloaded the bundle, this might work:
  26. $conf['fb_api_file'] = 'sites/all/modules/fb/facebook-platform/php/facebook.php';
  27. Customize the path above as needed for your installation.
  28. - If you intend to support canvas pages, install a Facebook-aware
  29. theme into one of Drupal's themes directories. One example theme is
  30. provided in the 'themes' directory of this module, but Drupal will
  31. not find it there. So, you must copy the entire theme directory to
  32. sites/all/themes, or another of Drupal's themes directories. Use a
  33. symbolic link, rather than copy, if you intend to make no changes
  34. and you want updates to be easier. Visit Site Building >> Themes so
  35. that Drupal will detect the new theme.
  36. - Edit your settings.php file (sites/default/settings.php, depending
  37. on your install) to include fb_settings.inc (in this directory).
  38. For example, add this at the very end of your settings.php:
  39. require_once "sites/all/modules/fb/fb_settings.inc";
  40. (Or whatever path is appropriate, could be
  41. "profiles/custom/modules/fb/fb_settings.inc")
  42. See the end of this file for other configuration you may add to
  43. settings.php.
  44. - Enable the Facebook modules via the drupal admin pages, as usual.
  45. You must enable at least "DFF Facebook API" and "DFF Applications"
  46. modules. You will probably want to enable "DFF User Management" and
  47. more of the modules as your App needs them. Enable "DFF Canvas
  48. Pages" if you support canvas pages. Enable "DFF Connect" for
  49. Facebook Connect features. During development, the "DFF Devel"
  50. module is a must.
  51. - You must enable clean URLs. If you don't, some links that drupal
  52. creates will not work properly on canvas pages.
  53. - Create an application on Facebook, currently at
  54. http://www.facebook.com/developers/editapp.php?new. Fill in the
  55. minimum required to get an apikey and secret. If supporting canvas
  56. pages, get a canvas name, too.
  57. - Go to Create Content >> Facebook Application. Use the apikey and
  58. secret that Facebook has shown you. If you have any trouble with
  59. the other fields, use Facebook's documentation to figure it out.
  60. When you submit your changes, Drupal for Facebook will automatically
  61. set the callback URL and some other properties which help it work
  62. properly.
  63. - If upgrading from an earlier Drupal for Facebook, revisit all of the
  64. Facebook Application nodes. Edit each one, look over all the
  65. settings as many have changed, especially the choices under user
  66. management. You'll have to submit your changes in order for your
  67. application to work properly with the new Facebook API.
  68. - This patch is required for Drupal 5.x: http://drupal.org/node/241878
  69. Troubleshooting:
  70. ---------------
  71. Reread this file and follow instructions carefully.
  72. Enable the devel module, http://drupal.org/project/devel.
  73. Enable the "DFF Devel" module and add the block it provides to the footer
  74. of your Facebook theme.
  75. If you see FBML Error (line 62): illegal tag "body" under "fb:canvas",
  76. or many "CSS Errors", visit ?q=admin/build/themes. Make sure you see
  77. fb_fbml in the list. It is not necessary to enable fb_fml, however
  78. you must hit submit (even with no changes) just to get Drupal to
  79. refresh its list of where the themes are located.
  80. If you _still_ see CSS Errors or HTML Errors, most likely the fb_fbml
  81. theme is still not being used. This can happen if the theme is
  82. initialized before fb.module is initialized. To avoid this, don't
  83. have any code that initializes a theme directly in your .module files,
  84. put that code in hook_init instead. And if still necessary, lower the
  85. weight of the fb module in your system table. See
  86. http://drupal.org/node/187868
  87. If you see "The page you requested was not found." Make sure the
  88. canvas page you specified agrees exactly with the canvas page assigned
  89. by facebook. Note also that facebook will make all letters lower case
  90. even if you typed them upper.
  91. Bug reports and feature requests may be submitted.
  92. Here's an idea: check the issue queue before you submit
  93. (http://drupal.org/project/issues/fb).
  94. If you do submit an issue, start the description with "I read the
  95. README.txt from start to finish," and you will get a faster, more
  96. thoughtful response. Seriously, prove that you read this far.
  97. Here is one way to set up your settings.php. Add the PHP shown below
  98. to the very end of your settings.php, and modify the paths accordingly
  99. (i.e. where I use "profiles/custom/modules/fb", you might use
  100. "sites/all/modules/fb").
  101. /**
  102. * Common settings for DFF
  103. */
  104. if (!is_array($conf))
  105. $conf = array();
  106. $conf['fb_verbose'] = TRUE; // debug output
  107. $conf['fb_actions_verbose'] = TRUE; // more debug output
  108. //$conf['fb_debug'] = TRUE; // Output from facebook's API.
  109. //$conf['fb_api_file'] = 'facebook-platform/php/facebook.php'; // default is 'facebook-platform/php/facebook.php'
  110. /**
  111. * Enable Drupal for Facebook. Sets up custom_url_rewrite and session
  112. * handling required for canvas pages and callbacks from facebook servers.
  113. */
  114. include "sites/all/modules/fb/fb_settings.inc";
  115. ?>