Instance Methods

__construct()

Upon instantiation, FacebookCanvasHelper validates and decrypts the signed request that was sent via POST if present.

getAccessToken()

public Facebook\AccessToken|null getAccessToken()

Checks the signed request for authentication data and tries to obtain an access token access token.

getUserId()

public string|null getUserId()

A convenience method for obtaining a user's ID from the signed request if present. This will only return the user's ID if a valid signed request can be obtained and decrypted and the user has already authorized the app.