Hello,

I have follow the README. I'm using PHP5 API. I was able to create a facebook app in drupal and in Facebook. But when I try to access it I have this error :

Facebook API exception Invalid parameter.
#0 /var/www/html/www/centrale-test/modules/fb/facebook-platform/client/facebookapi_php5_restlib.php(537): FacebookRestClient->call_method('facebook.users....', Array)
#1 /var/www/html/www/centrale-test/modules/fb/fb_canvas.module(26): FacebookRestClient->users_isAppAdded()
#2 /var/www/html/www/centrale-test/modules/fb/fb.module(509): fb_canvas_fb(Object(Facebook), Object(stdClass), 'init', NULL, NULL)
#3 /var/www/html/www/centrale-test/modules/fb/fb.module(100): _fb_invoke(Object(stdClass), 'init')
#4 [internal function]: fb_init()
#5 /var/www/html/www/centrale-test/includes/module.inc(406): call_user_func_array('fb_init', Array)
#6 /var/www/html/www/centrale-test/includes/common.inc(1848): module_invoke_all('init')
#7 /var/www/html/www/centrale-test/includes/bootstrap.inc(834): _drupal_bootstrap_full()
#8 /var/www/html/www/centrale-test/includes/bootstrap.inc(771): _drupal_bootstrap(7)
#9 /var/www/html/www/centrale-test/index.php(13): drupal_bootstrap(7)
#10 {main}

Any help would be appreciated.

Thank you,

Nicholas

Comments

Dave Cohen’s picture

I'm really not sure what the problem is. Possibly you have not copied the apikey or secret exactly.

I recommend you switch to using the PHP4 api and see if you get a clearer error message. If so you can fix the problem then switch back to the PHP5 API.

Nikho’s picture

Thank you for your answer.

I have install the api php4 with simple XML. When I access my the canvas url it redirect me to facebook and ask me if I want to install the application. I choose yes. But then when I go to my application apps.facebook.com/myapp I have this error :

The URL http://MY-IP/centrale-test/fb_cb/1665/ caused too many redirections.

Again do you have any clue about what can cause this error?

Thank you,
Nicholas

Dave Cohen’s picture

Status: Active » Postponed (maintainer needs more info)

The error implies that you're redirecting in an infinite loop. What does your site's front page do? It sounds like something is calling drupal_goto.

Try visiting something like apps.facebook.com/myapp/node/123 just to see if that works.

Nikho’s picture

Thank you for your help.

I have figured out why. I think there is an incompatibily between the module Global Redirect and FB. When I disable Global redirect my facebook app is working.

Have a good day,

Nicholas

Dave Cohen’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Thanks for the followup.

I'm not sure whether to resolve this or not, because maybe there is something FB can do to make the module's work well together. Realistically I don't have time to investigate. So I'm going to resolve this unless it comes up again.

Dave Cohen’s picture

Title: Facebook API exception Invalid parameter. » Global Redirect breaks Drupal for Facebook.
Status: Closed (won't fix) » Postponed (maintainer needs more info)

I've tracked down a couple problems and I've asked for help from the Global Redirect developers. http://drupal.org/node/257740

In the meantime, you must disable Global Redirect in order to use Drupal for Facebook.

dparizek’s picture

Its been 2 years since last post, has this been fixed?

Dave Cohen’s picture

I don't know, because I don't use global redirect. But over time, Drupal for Facebook has stopped using url rewriting, except in special cases where it may still be configured to do so. I'd be interested to hear from global redirect users whether this is still a problem.

Dave Cohen’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Global Redirect still breaks drupal for facebook. I am cleaning the issue queue of the 5.x version.

el_reverend’s picture

I was wondering if the issue between Global Redirect module and DfF still exists and in what scope? Does this only affect the Facebook Apps created on the Drupal site or all of Drupal for Facebooks functionality with Drupal?