Posts tagged with facebook-php-sdk

HI im trying to create live stream RTMS url with product_items enum list. Please give me solution how i can add the products , note the product id already created in facebook and it's facebook product id, also try to assign array of enum like ['productId1','productId2'] but still not working here the code

        try {             $response = $this->fbLatest->post("/" . $this->pageID . "/live_videos", [                 'access_token' => $this->accessToken,                 'status' => 'LIVE_NOW',                 'title' => 'testtsss',                 'description' => 'asdsadasdadasdadadad',                 'product_items' =>                  [                         array(                             'id' => "25252395334406077",                             'retailer_id' => "25252395334406077",                             'product_id' => "25252395334406077",                             'position' => array(                                 'x' => 0.1,                                 'y' => 0.1                             ),                             'start_time_offset_ms' => 0,                             'end_time_offset_ms' => 60000                         ),                 ]             ]);             $graphNode = $response->getGraphNode();             $stream_url = $graphNode->getField('stream_url');             $streamID = $graphNode->getField('id');             dd($graphNode , $stream_url);         } catch (\Facebook\Exceptions\FacebookResponseException $e) {             dd($e);             echo 'Graph returned an error: ' . $e->getMessage();         } catch (\Facebook\Exceptions\FacebookSDKException $e) {             dd($e);             echo 'Facebook SDK returned an error: ' . $e->getMessage();         } 

here the error:

Please help with this.

Trying to log in with Facebook using the below code. code

I get the following error: URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs. Error

In the advanced tab, Valid OAuth redirect URIs is set to: https://smarteresto.com/facebookpost/callback

More settings

App key and secret are correct. Facebook SDK for PHP (v5)

I'm trying to set up the FB for business login on my facebook app (reviewed and validated).

I'm using laravel php callback. it works with users logged into facebook that have admin role on my app.

return Socialite::driver('facebook') ->scopes($scopes) ->redirect();

I works fine with users that are admin of my app, but i get a blank popup login page when I use any other users

Can anybody help on this?

inspecting the browser console it shows this error

c7bTB9A8MMc.js?_nc_x=d7ylh6LA-3y:69

ErrorUtils caught an error:

Minified invariant #21945;

i have 1 dog page on Facebook, i usually post photo of dogs when ever i have time, so trying to write a scheduler that will take images from my system folder and upload and publish on my page.

i want to post images, from my local system to 1 of my managed pages. i have page access token. and using below curl i am getting response as well.

curl 'https://graph.facebook.com/v19.0/page_id/photos?published=true' -H 'Cookie: ps_l=0; ps_n=0; ps_l=0; ps_n=0' -F 'access_token="my_page_access_toekn"' -F 'source=@"/C:/Users/Downloads/cute_dog.jpg"' -F 'publish="true" 

and i am getting response back

{     "id": "38868xxxxx",     "post_id": "10326941xxxxx_388682220xxxxx" } 

when i login from my own account, i can see the images being posted on the page. but when i login from my friend account, i don't see the image. i tried adding publish="true in body as well as in path param, but nothing seems working. for reference, i am following this page https://developers.facebook.com/docs/pages-api/posts

what am i missing?