You are here

function _fb_settings_base64_url_decode in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb_settings.inc \_fb_settings_base64_url_decode()

Base64 encoding that doesn't need to be urlencode()ed. Exactly the same as base64_encode except it uses

  • instead of +

_ instead of /

Parameters

String base64UrlEncodeded string:

1 call to _fb_settings_base64_url_decode()
_fb_settings_parse_signed_request in ./fb_settings.inc
See https://developers.facebook.com/docs/authentication/signed_request/ for a more reliable version of this function. We skip validation because we do not yet know the app secret.

File

./fb_settings.inc, line 65
This file is to be included from your sites/.../settings.php file.

Code

function _fb_settings_base64_url_decode($input) {
  return base64_decode(strtr($input, '-_', '+/'));
}