library/Garp/3rdParty/facebook/src/base_facebook.php
protected function makeSignedRequest($data) {
    if (!is_array($data)) {
      throw new InvalidArgumentException(
        'makeSignedRequest expects an array. Got: ' . print_r($data, true));
    }
    $data['algorithm'] = self::SIGNED_REQUEST_ALGORITHM;
    $data['issued_at'] = time();
    $json = json_encode($data);
    $b64 = self::base64UrlEncode($json);
    $raw_sig = hash_hmac('sha256', $b64, $this->getAppSecret(), $raw = true);
    $sig = self::base64UrlEncode($raw_sig);
    return $sig.'.'.$b64;
  }
protected function makeSignedRequest($data) {
    if (!is_array($data)) {
      throw new InvalidArgumentException(
        'makeSignedRequest expects an array. Got: ' . print_r($data, true));
    }
    $data['algorithm'] = self::SIGNED_REQUEST_ALGORITHM;
    $data['issued_at'] = time();
    $json = json_encode($data);
    $b64 = self::base64UrlEncode($json);
    $raw_sig = hash_hmac('sha256', $b64, $this->getAppSecret(), $raw = true);
    $sig = self::base64UrlEncode($raw_sig);
    return $sig.'.'.$b64;
  }
protected function makeSignedRequest ( $ data ) { if ( ! is_array ( $ data ) ) { throw new InvalidArgumentException ( 'makeSignedRequest expects an array. Got: ' . print_r ( $ data , true ) ) ; } $ data [ 'algorithm' ] = self :: SIGNED_REQUEST_ALGORITHM ; $ data [ 'issued_at' ] = time ( ) ; $ json = json_encode ( $ data ) ; $ b64 = self :: base64UrlEncode ( $ json ) ; $ raw_sig = hash_hmac ( 'sha256' , $ b64 , $ this -> getAppSecret ( ) , $ raw = true ) ; $ sig = self :: base64UrlEncode ( $ raw_sig ) ; return $ sig . '.' . $ b64 ; }
Makes a signed_request blob using the given data.

@param array The data array.
@return string The signed request.
Makes a signed_request blob using the given data .