function _facebook_album_translate_api_error in Facebook Album 7.3
Same name and namespace in other branches
- 7.2 facebook_album.module \_facebook_album_translate_api_error()
Translate API errors into a user friendly error.
Parameters
$code: The error code returned from the facebook API or internally
$message: The corresponding message to that error code, if there is one
Return value
string A user friendly error message
1 call to _facebook_album_translate_api_error()
- facebook_album_admin_form_submit in ./
facebook_album.admin.inc - Implements hook_admin()
File
- ./
facebook_album.module, line 646
Code
function _facebook_album_translate_api_error($code, $message) {
switch ($code) {
case 1:
$message = "Unable to retrieve data from Facebook. This could be due to an invalid Application ID/Application Secret or Facebook is temporarily unreachable.";
break;
case 10000:
$message = "Unable to verify data from Facebook at this time. Please try again.";
break;
default:
}
return t($message);
}