Posts under category facebook-graph-api

I'm encountering an issue while implementing login with Facebook APIs in my Laravel(v5.7) application. When attempting to connect to the Facebook Graph API endpoint (graph.facebook.com:443), I'm receiving the following error:
OpenSSL SSL_connect: Connection was reset in connection to graph.facebook.com:443

This error occurs during the authentication process, and it's preventing users from logging in using their Facebook accounts

code snippet:

public function addFacebookAccount($adsAccount = false)     {         $message = "Your account is connected. Check back later as data is populated.";         $helper = $this->connection()->getRedirectLoginHelper();         if ($state = \Request::get('state', null)) {             $helper->getPersistentDataHandler()->set('state', $state);         }         try {             $token = (string) $helper->getAccessToken();             if ($adsAccount) {                 $fb_user = (new Support\Endpoints\FacebookUser($token))->me();                 $account = FacebookApi::firstOrCreate([                     'company_id'        => \App\Models\Client::current(),                     'social_account_id' => $fb_user['id']                 ], ['social_account_name' => $fb_user['name']]);                                  $account->access_token = $token;                 $account->save();                 $this->initializeAdAccountTokens($account->social_account_id, $account->access_token, $account->company_id);             } else {                 $fb_user = (new Support\Endpoints\FacebookUser($token))->me();                 $account = FacebookApi::firstOrCreate([                     'company_id'        => \App\Models\Client::current(),                     'social_account_id' => $fb_user['id']                 ], ['social_account_name' => $fb_user['name'], 'is_disabled' => 0]);                                  $account->access_token = $token;                 $account->save();                 $this->insertUserPageTokens($account);             }         } catch (FacebookResponseException $e) {             // When Graph returns an error             \Log::info('Graph returned an error: ' . $e->getMessage());             $message = 'We could not log you in at this time';         } catch (FacebookSDKException $e) {             // When validation fails or other local issues             \Log::info('Facebook SDK returned an error: ' . $e->getMessage());             $message = 'We could not log you in at this time';         } return isset($fb_user) ? ['info' => $message, 'name' => $fb_user['name']]:          ['info' => $message];     } 

my logs file :

Facebook SDK returned an error: OpenSSL SSL_connect: Connection was reset in connection to graph.facebook.com:443enter image description here 

How can I troubleshoot and resolve this issue?

I am using Meta graph api https://developers.facebook.com/docs/instagram-api/guides/content-publishing/#reels-posts

and it is working fine for publishing reels immediately.

I don't see in the documentation of any mention of how to schedule the reel at a particular time. (In contrast, you can do this for facebook reels by using scheduled_publish_time

I read online that this should be possible for Instagram as well https://business.instagram.com/blog/instagram-api-features-updates

Question Can you guide me with one example of how to schedule Instagram reel via API ?

Two more optional ones

  1. (Optional) Can I upload video from my local to instagram ? In the docs they require video_url, but for facebook api I can also upload data from local file
  2. (Optional) Is it possible to cross-post in instagram-facebook, same way we can do via Meta Business Suite

Thanks in advance

I am trying to properly set up my Facebook login link, however, I have no idea what the login URL is actually supposed to be. The furthest I have gotten is that my app ID is formatted correctly, and that my response type is correct. Everything else I am unfamiliar with. What my URL currently looks like: "https://www.facebook.com/v19.0/dialog/oauth?client_id=[my ID]&redirect_uri="https://www.facebook.com/connect/login_success.html"&state="{st=[st],ds=[ds]}"&response_type=token"

I have tried removing square brackets (to get the above link), but that didn't work. It does not redirect to the redirect URI and instead pretends that I don't have such URI. I looked at similar posts about this error, however, in those posts, you often have to white list the link, attempting to white list my link results in Facebook that I cannot white list Facebook links. Turning on "Embedded Browser OAuth Login" also does not solve the problem.

When I'm trying to use Graph API to send a message from FB page to an user. I get this error:

{   "error": {     "message": "Unsupported post request. Object with ID '100066276464105' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",     "type": "GraphMethodException",     "code": 100,     "error_subcode": 33,     "fbtrace_id": "AkMoCKVHuPHXAT7IQubn6rE"   } } 

I have checked the other document and see this issue related with missing permission on my Facebook app, but I already has "pages_show_list" permission:

"pages_read_engagement" and "pages_read_user_content":

"pages_manage_ads":

This is my Graph API call:

Have someone got the same issue as me?

UPDATED: I have try again and this is the current issue that I have Step 1: I using GET method to get my user id (UID) Step 2: Then I get my facebook page Id (PID) Step 3: Then I using my user to send the initial message to the facebook page, after that I use the POST call to send response message to the initial message.

Where do I go wrong?