def get_token_from_hash(hash)
      access_token = hash.delete('access_token') || hash.delete(:access_token) || hash.delete('oauth_token') || hash.delete(:oauth_token)
      opts = {:expires_at => hash["expires"] || hash[:expires],
              :header_format => "OAuth2 %s",
              :param_name => "access_token"}
      
      @token = OAuth2::AccessToken.new(self, access_token, opts)
    end
def get_token_from_hash(hash)
      access_token = hash.delete('access_token') || hash.delete(:access_token) || hash.delete('oauth_token') || hash.delete(:oauth_token)
      opts = {:expires_at => hash["expires"] || hash[:expires],
              :header_format => "OAuth2 %s",
              :param_name => "access_token"}
      
      @token = OAuth2::AccessToken.new(self, access_token, opts)
    end
Initializes an AccessToken from a hash

 @param [Hash] hash a Hash contains access_token and expires
 @return [AccessToken] the initalized AccessToken