While following the directions on page:

http://drupal.org/node/625792

Attempting to submit from Create content > Facebook Application, I get the following error showing up 4 times:

Attempt to assign property of non-object in /home/drupal_owner/drupal-6.14/sites/all/modules/fb/fb_app.module on line 420.

The app is not created.

Line 420 is the assignment in:

/**
* Convenience method for other modules to attach data to the fb_app object.
*/
function fb_app_get_data(&$fb_app) {
if (!isset($fb_app->fb_app_data)) {
$fb_app->fb_app_data = isset($fb_app->data) ? unserialize($fb_app->data) : array();
}
return $fb_app->fb_app_data;
}

Comments

Dave Cohen’s picture

Title: Create content > Facebook Application error » Attempt to assign property of non-object
Category: bug » support

Follow the prerequisites, especially the part about PHP JSON.

http://drupal.org/node/625764

jabowery’s picture

drupal_owner@li89-226:~/current_drupal$ php --version
PHP 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 26 2009 20:09:03)

Installed with apt-get install.

Isn't that supposed to have JSON built in?

(the other prerequisites are fulfilled)

jabowery’s picture

It did this under Chrome only. Under IE8, it seems to have worked properly. It still failed after I cleared cache in Chrome.

Dave Cohen’s picture

What your describing is a server-side problem. The browser shouldn't matter.

Try deleting the file facebook-platform/jsonwrapper/jsonwrapper_inner.php. If PHP complains about the file not found, then your PHP does not include the necessary functions. This problem is with facebook's api libraries, not Drupal for Facebook. I've reported the problem (http://bugs.developers.facebook.com/show_bug.cgi?id=4351) but I'd be surprised if facebook ever does anything about it.

thedavidmeister’s picture

Status: Active » Fixed

This function does not exist anymore.

Status: Fixed » Closed (fixed)

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