I've also seen "Failed to get application properties from Facebook: Incorrect signature 104", after I reset my secret. I don't know whether this is a Facebook bug like this - http://forum.developers.facebook.com/viewtopic.php?pid=134356 - or something I've done wrong in installing the module or configuring the server, or whatnot. I'd like to get past this so I can at least have a shot at failing further down the line. PS. As per instructions, I read all the way to the bottom of the readme. ALEX

CommentFileSizeAuthor
#4 fb_app_table_cleanup.diff3.87 KBDave Cohen

Comments

Dave Cohen’s picture

Have you double checked your apikey and secret? Make sure no extra spaces or anything. Copy it exactly from the page on facebook.

alexevasion’s picture

Thanks very much for the quick reply. I've quadruple checked this stuff. Though I do think it is weird that the error message changed when I reset the key. Perhaps I should delete my application and start again? Tried that... nope, same problem: Invalid API key 101. I must have set the module up wrong or done something else silly. ALEX

Dave Cohen’s picture

Assigned: Unassigned » Dave Cohen

Do you see an error in your logs? Are there any rows in the fb_app table?

I think the problem is where the fb_app node is saved. fb_app_insert() has bad SQL, but only when the database is in strict mode, so nobody's reported this before. I'll look into this more tomorrow.

Dave Cohen’s picture

StatusFileSize
new3.87 KB

Please try the attached patch. To use it, you must patch the files, then run update.php. Then delete the Facebook Application node which was causing you problems and create a new one. Editing the old one will not work.

alexevasion’s picture

I was about to apply the patch, but then saw that there was a new dev version available and decided to just try installing that over the top... no more error. I don't know if that is a valuable clue to what was wrong in the first place... I probably should've tried the patch (if I get stuck perhaps I'll go back and try to recreate the problem and potential fix for your records), but I got overexcited. Thanks so much again for the efforts, ALEX

Dave Cohen’s picture

Status: Active » Fixed

OK, not sure what caused your problem, then. If it reappears please let me know.

alexevasion’s picture

I hit another snag, though it is probably unrelated... my canvas page says
Fatal error: Call to undefined function dprint_r() in /home1/soccurre/public_html/sharability/modules/fb/fb_canvas.module on line 457
Can you tell me what might be causing this? I installed the devel module to try and figure it out, but no luck yet. I've got the callback url correct, but I'm pretty sure I'm just missing something. Thanks, ALEX

Dave Cohen’s picture

Its a function in the devel module. Either enable devel or comment out the line that's calling it. Its just for debugging and was checked in accidentally.

alexevasion’s picture

Without that line, I get the redirect loop like the folks in http://drupal.org/node/408432. Separate issue, though.

Status: Fixed » Closed (fixed)

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

pribeh’s picture

Status: Closed (fixed) » Active

hey Dave,

I'm getting the 101 api error having setup a new app in D6 with the latest May 27th dev release, after having upgraded from the D5 version, deleted my (DFFB content) app and run update.php. Mind you, I'm still using the same application on facebook that I used for my previous DFFB (content) app. I also get the following error (not sure if it's a separate issue):

user warning: Duplicate entry '798caa84c1dc779fe4b25e3af799c4c7' for key 2 query: INSERT INTO fb_app (nid, label, apikey, secret, id, canvas, data) VALUES (969, 'londonfuse', '798caa84c1dc779fe4b25e3af799c4c7', '6f8009c875f6263bcd65adb98ac42ede', '56705909093', 'londonfuse', 'a:6:{s:6:\"fb_app\";a:1:{s:13:\"set_app_props\";i:1;}s:13:\"fb_permission\";a:2:{s:3:\"map\";a:8:{s:5:\"email\";i:0;s:14:\"offline_access\";i:0;s:13:\"status_update\";i:0;s:12:\"photo_upload\";i:0;s:14:\"create_listing\";i:0;s:12:\"create_event\";i:0;s:10:\"rsvp_event\";i:0;s:3:\"sms\";i:0;}s:6:\"prompt\";a:8:{s:5:\"email\";i:0;s:14:\"offline_access\";i:0;s:13:\"status_update\";i:0;s:12:\"photo_upload\";i:0;s:14:\"create_listing\";i:0;s:12:\"create_event\";i:0;s:10:\"rsvp_event\";i:0;s:3:\"sms\";i:0;}}s:11:\"fb_register\";a:1:{s:14:\"register_users\";i:0;}s:9:\"fb_canvas\";a:5:{s:15:\"front_anonymous\";s:0:\"\";s:14:\"front_loggedin\";s:0:\"\";s:11:\"front_added\";s:0:\"\";s:10:\"theme_fbml\";s:7:\"fb_fbml\";s:12:\"theme_iframe\";s:1:\"0\";}s:10:\"fb_connect\";a:1:{s:7:\"primary\";i:0;}s:7:\"fb_user\";a:7:{s:13:\"require_login\";s:1:\"1\";s:14:\"create_account\";s:1:\"2\";s:11:\"map_account\";s:1:\"2\";s:14:\"unique_account\";i:0;s:12:\"new_user_rid\";s:1:\"2\";s:17:\"not_logged_in_uid\";s:0:\"\";s:13:\"logged_in_uid\";s:0:\"\";}}') in /var/www/thomas/lc3/sites/all/modules/fb/fb_app.module on line 373.

Tried applying your patch but failed - I assume it was for a previous version of DFFB. And now after viewing the app I get:

exception 'FacebookRestClientException' with message 'Invalid API key' in /var/www/mysite/sites/all/modules/fb/facebook-platform/php/facebookapi_php5_restlib.php:2977
Stack trace:
#0 /var/www/mysite/sites/all/modules/fb/facebook-platform/php/facebookapi_php5_restlib.php(2821): FacebookRestClient->call_method('facebook.admin....', Array)
#1 /var/www/mysite/sites/all/modules/fb/fb_app.module(327): FacebookRestClient->admin_getAppProperties(Array)
#2 /var/www/mysite/sites/all/modules/fb/fb_app.module(239): fb_app_get_app_properties(Object(stdClass))
#3 /var/www/mysite/modules/node/node.module(653): fb_app_view(Object(stdClass), false, true, NULL)
#4 /var/www/mysite/modules/node/node.module(1077): node_invoke(Object(stdClass), 'view', false, true)
#5 /var/www/mysite/modules/node/node.module(1001): node_build_content(Object(stdClass), false, true)
#6 /var/www/mysite/modules/node/node.module(1096): node_view(Object(stdClass), false, true)
#7 /var/www/mysite/modules/node/node.module(1785): node_show(Object(stdClass), NULL)
#8 /var/www/mysite/sites/all/modules/ctools/delegator/plugins/tasks/node_view.inc(92): node_page_view(Object(stdClass))
#9 [internal function]: delegator_node_view(Object(stdClass))
#10 /var/www/mysite/includes/menu.inc(348): call_user_func_array('delegator_node_...', Array)
#11 /var/www/mysite/index.php(18): menu_execute_active_handler()
#12 {main}
Dave Cohen’s picture

I think you need to fix the duplicate entry problem before the app data can be properly saved. Do you have two Facebook Application nodes with the same apikey?

The modules should check for that during validation, but I don't think they do right now.

pribeh’s picture

I have deleted all my FB app nodes. But when I go to create one it still shows some sort of duplication from all these error messages. I'm going to check with my sys admin to see if there's anything in the database. I'm going to get rid of all Fb references and start again.

pribeh’s picture

Status: Active » Closed (fixed)

I'm just closing for now since it was only a matter of deleting what appeared to be database files that weren't removed properly or overwritten from a D5 version.