I have been trying to build an app (react for front end with typescript) that requires social media integration from various platforms, one of which is Facebook. So, I tried to follow the Meta docs and tried to implement the Facebook Login through their SDK code. The login alone was not very difficult to code, however when I refresh the page or switch to a different page and then return back to the one with the Facebook Login button, I am automatically logged out, and need to log back in every time.

I have looked through so many resources and forums trying to understand how to properly implement the Facebook login where a user can safely log in and would stay logged in throughout page refreshes until they directly click on a logout button. I feel like the Meta docs are pretty good, but the code and instructions they provide are in "pieces", if that makes sense. So, are there any full-length, detailed tutorials or guides available that I can follow along to implement this feature?

im failing to decrypt the response from the whatsapp flow, and im using php, codeigniter 4 with the phpseclib3 library, and below is my sample code:

private function decryptRequest($body, $privatePem) {     $encryptedAesKey   = base64_decode($body['encrypted_aes_key']);     $encryptedFlowData = base64_decode($body['encrypted_flow_data']);     $initialVector     = base64_decode($body['initial_vector']);     $rsa = RSA::load($privatePem)         ->withPadding(RSA::ENCRYPTION_OAEP)         ->withHash('sha256')         ->withMGFHash('sha256');                          $decryptedAesKey = $rsa->decrypt($encryptedAesKey);              if (!$decryptedAesKey) {         throw new Exception('Decryption of AES key failed.');     }          $aes = new AES('gcm');     $aes->setKey($decryptedAesKey);     $aes->setNonce($initialVector);          $decrypted = $aes->decrypt($encryptedFlowData);     if (!$decrypted) {         throw new Exception('Decryption of flow data failed.');     }          return [         'decryptedBody' => json_decode($decrypted, true),         'aesKeyBuffer' => $decryptedAesKey,         'initialVectorBuffer' => $initialVector,     ]; } 

and im getting the Ciphertext representative too long error on this line: $decryptedAesKey = $rsa->decrypt($encryptedAesKey);

I have tried to refer to the docementation here https://developers.facebook.com/docs/whatsapp/cloud-api/reference/whatsapp-business-encryption

I do not have sufficient permission to enter the media partners support portal. How do I submit a request or enter the portal?

I am trying to use Meta Cloud API to send an image as whatsapp message, but I don't want to upload it anywhere, can't i just send the binary buffer?

something like this:

const formData = new FormData(); formData.append('messaging_product', 'whatsapp'); formData.append('recipient_type', 'individual'); formData.append('to', content.to); formData.append('type', 'image'); formData.append(     'file',     content.image_buffer,     {         filename: 'image.png',         contentType: 'image/png',     } ); 

I was using a service (Business Solution Provider) that allowed me to send the image directly as binary buffer. Now i will use Meta Cloud API, but didn't find anything like this in the docs

I am trying to grant Facebook permission.

On the Facebook 'Permissions and Features' the button 'Request advanced access' is disabled. If you trying to click button the message appears: "To request advanced access to this permission, you need to make a successful test API call. It may take up to 24 hours after the first API call for this button to become active."

I have make API call but nothing heppend, still Active (0) API calls.