skip to Main Content

The provided image file is invalid. Please check your image path again. Facebook Graph Api error

I am trying to upload image to Facebook graph api with Http Client of Laravel. But I am getting the error mentioned before. $ad_account_id = env("AD_ACCOUNT_ID"); $access_token = env("ACCESS_TOKEN"); $image = $request->file('image'); $response = Http::asForm() ->withHeaders(['Content-Type: multipart/form-data']) ->post('https://graph.facebook.com/v14.0/act_' . $ad_account_id…

VIEW QUESTION

How to remove the embedded formatting of an UTF-8 string?

I'm querying the Facebook API in PHP to get a list of posts and display it on a website. // $facebook is an instance of FacebookFacebook $response = $facebook->get('posts?fields=id,message,created_time,full_picture,permalink_url,status_type&limit=20'); $graphEdge = $response->getGraphEdge(); $posts = []; foreach ($graphEdge as $post) {…

VIEW QUESTION
Back To Top
Search