summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Cohen2009-01-14 22:56:33 (GMT)
committer Dave Cohen2009-01-14 22:56:33 (GMT)
commitd60fcd64e9738d76747452f8af9acb859d6d40b2 (patch)
treea11885fd630312c5eb13afb167c7f354bb19d0af
parent5e393f8b663e6493b9c05be40a4e61c9ce086538 (diff)
#355577
Now using latest PHP libs from facebook. Replaced users_isAppAdded with users_isAppUser
-rw-r--r--README.txt25
-rw-r--r--fb.module2
-rw-r--r--fb_canvas.module2
-rw-r--r--fb_user.module12
4 files changed, 22 insertions, 19 deletions
diff --git a/README.txt b/README.txt
index ec8642f..5ca2a1b 100644
--- a/README.txt
+++ b/README.txt
@@ -16,17 +16,20 @@ documentation for more detailed instructions.)
To install or upgrade from an earlier version of Drupal for Facebook:
-- This version requires a newer version of the Facebook API. As of
- this writing, you can get this via Subversion at
- http://svn.facebook.com/svnroot/platform/clients/php/branches/redesign-changes
-
-- Once you have the new API client, place it somewhere where it can be
- loaded, and set a drupal variable, 'fb_api_file', to the location of
- facebook.php. For example, first checkout redesign-changes in the
- directory where this file is located. Then, add
- $conf['fb_api_file'] = 'redesign-changes/facebook.php';
- near the end of your settings.php file.
- You will get a cryptic error message until you have done this correctly.
+- 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
+ 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
diff --git a/fb.module b/fb.module
index 60761ef..5c85fcb 100644
--- a/fb.module
+++ b/fb.module
@@ -158,7 +158,7 @@ function fb_api_init($fb_app, $fbu) {
set_exception_handler('fb_handle_exception');
if (!count($cache)) {
- $filename = variable_get('fb_api_file', 'facebook-platform/client/facebook.php');
+ $filename = variable_get('fb_api_file', 'facebook-platform/php/facebook.php');
if (!file_exists($filename)) {
// Print an error directly to the canvas page.
diff --git a/fb_canvas.module b/fb_canvas.module
index aa2b0a1..8eb5e07 100644
--- a/fb_canvas.module
+++ b/fb_canvas.module
@@ -89,7 +89,7 @@ function fb_canvas_fb($op, $data, &$return) {
//drupal_set_message("fb_canvas_fb" . dpr($_GET, 1) . 'arg(0) = ' . dpr(arg(0), 1) . 'arg(1) = ' . dpr(arg(1), 1) . 'frontpage ' . dpr(variable_get('site_frontpage', 'node'), 1));
if ($_GET['q'] == drupal_get_normal_path(variable_get('site_frontpage', 'node'))) {
- if ($fb->api_client->users_isAppAdded())
+ if ($fb->api_client->users_isAppUser())
$front = $fb_canvas_data['front_added'];
else if ($fb->get_loggedin_user())
$front = $fb_canvas_data['front_loggedin'];
diff --git a/fb_user.module b/fb_user.module
index 10b5a8e..e3b6782 100644
--- a/fb_user.module
+++ b/fb_user.module
@@ -45,7 +45,7 @@ function _fb_user_track($fb, $fb_app, $user) {
if (!$user->uid || $user->uid == $fb_user_data['not_logged_in_uid'] || $user->uid == $fb_user_data['logged_in_uid']) {
$result =db_query("REPLACE INTO {fb_user_app} (apikey, fbu, added, time_access, session_key, session_key_expires) VALUES ('%s', %d, %d, %d, '%s', %d)",
$fb_app->apikey, fb_facebook_user(),
- $fb->api_client->users_isAppAdded(), time(),
+ $fb->api_client->users_isAppUser(), time(),
$fb->api_client->session_key, $_REQUEST['fb_sig_expires']
);
}
@@ -54,7 +54,7 @@ function _fb_user_track($fb, $fb_app, $user) {
$result =db_query("REPLACE INTO {fb_user_app} (apikey, fbu, uid, added, time_access, session_key, session_key_expires) VALUES ('%s', %d, %d, %d, %d, '%s', %d)",
$fb_app->apikey, fb_facebook_user(),
$user->uid,
- $fb->api_client->users_isAppAdded(), time(),
+ $fb->api_client->users_isAppUser(), time(),
$fb->api_client->session_key, $_REQUEST['fb_sig_expires']
);
}
@@ -145,7 +145,7 @@ function fb_user_fb($op, $data, &$return) {
// Check if we need to create a local account for this user.
if (($fb_user_data['create_account'] == FB_USER_OPTION_CREATE_ADD &&
- $fb->api_client->users_isAppAdded()) ||
+ $fb->api_client->users_isAppUser()) ||
($fb_user_data['create_account'] == FB_USER_OPTION_CREATE_LOGIN)) {
// Check if the local account is already made.
@@ -200,12 +200,12 @@ function fb_user_fb($op, $data, &$return) {
// anything related to Drupal accounts.
/** I _think_ the new api no longer requires this. TODO: confirm.
if (strpos($_GET['q'],'user/login') === 0) {
- // Have to check idAppAdded in case of iframe.
- if (!$fb->api_client->users_isAppAdded())
+ // Have to check idAppUser in case of iframe.
+ if (!$fb->api_client->users_isAppUser())
$fb->require_login();
}
else if (strpos($_GET['q'],'user/register') === 0) {
- if (!$fb->api_client->users_isAppAdded())
+ if (!$fb->api_client->users_isAppUser())
$fb->require_login();
}
*/