Closed (cannot reproduce)
Project:
Facebook OAuth (FBOAuth)
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2012 at 22:29 UTC
Updated:
25 Dec 2012 at 05:29 UTC
Line 52 in fboauth.fboauth.inc
No where in this function does it check for an includes file within the $action variable.
/**
* Invoke an action specified through hook_fboauth_action_info().
*/
function fboauth_action_invoke($action_name, $app_id, $access_token) {
$action = fboauth_action_load($action_name);
// Call the specified action.
if (isset($action['callback'])) {
$callback = $action['callback'];
if (function_exists($callback)) {
return $callback($app_id, $access_token);
}
}
}
This function will not call a custom action's function if the function is in an include file. Setting the 'file' parameter of your custom action is not recognized.
To solve this problem I simply put my custom action function inside my custom module, but tracking down the reason why it wasn't working took some time.
$actions['login'] = array(
'title' => t(Login'),
'file' => 'includes/mymodule.fboauth.inc', // <------- This does nothing...
'callback' => 'mymodule_action_login',
'permissions' => array_keys(fboauth_user_connect_permissions()),
);
Comments
Comment #1
K.MacKenzie commentedOh and thanks for the Module. Aside from this little bug it has been working great for my purposes!
Comment #2
quicksketchHm, yep sure enough! I'll take a look at this next time I'm going through the FBOAuth queue.
Comment #3
quicksketchIt looks like
fboauth_action_load()does the inclusion:Since fboauth_action_load() is called on the first line of fboauth_action_invoke(), the necessary include file is loaded properly.
In my testing this is operating correctly. Please reopen if you've found that this is not the case.
Comment #4
quicksketch