public static function generateSignature(InstagramApp $app, $endpoint, $params)
    {
        $signature = $endpoint;
        ksort($params);
        foreach ($params as $key => $value) {
            $signature .= "|$key=$value";
        }

        return hash_hmac('sha256', $signature, $app->getSecret(), false);
    }