Posts under category facebook-graph-api

I do not know where the OAuth error comes from, when I use a wrong ID or access token i get a different error.

curl -i -X POST "https://graph.threads.net/v1.0/user_id_placeholder/threads" -d "media_type=IMAGE" -d "image_url=https://i.postimg.cc/7LLYvNSq/pexels-ozanculha-17858988.jpg" -d "text=#BronzFonz" -d "access_token=placeholder" 
{"error":{"message":"An unexpected error has occurred. Please retry your request later.","type":"OAuthException","is_transient":true,"code":2,"fbtrace_id":"AuXxSa8ftZnjb-aSSAuGr_O"}} 

Graph API access token on MBS is required to have access to the catalogue, but the token expires either after 23 hours or 3 months, depending on your needs for it.

Here's the thing: it's rather complicated and laborious for a non-dev or non-tech people in general to get it because you have to be registered as a developer on Meta and navigate to Graph API so you can generate the token (and so on, they will have to get it anyways to access their catalogue).

While I was reading Graph API docs, I found out that the access token is a develop test access token and not an ordinary daily access token, which gave me some hope, but unfortunately, I didn't found much info about how the catalogue access works.

I don't know if I made myself clear, but I appreciate anyone who can help me and suggest whatever I should do next!


I'm developing an app using the Instagram messaging / send api and am sporadically getting this error

Request

data=f'recipient={{"id":"{reply_recipient_id}"}}&message={{"text":"{rm}"}}' r = requests.post("https://graph.facebook.com/v20.0/me/messages?access_token={}".format(access_token), data=data) 

Response

{'error': {'message': '(#100) Empty text', 'type': 'OAuthException', 'code': 100, 'error_subcode': 2534052, 'fbtrace_id': 'ABtZnf58ICsDpqWwJslG2wD'}} 

Any idea on what this is?

Thanks

I'm trying to make a Laravel task that will publish a picture each week on my page.

Here's my code:

public function postToFacebook($message, $imageUrl): array|string{         try {             $response = $this->fb->post('/me/feed', [                 'message' => $message,                 'link' => "https://google.fr",             ], env('FACEBOOK_ACCESS_TOKEN'));             return $response->getDecodedBody();         } catch(\Facebook\Exceptions\FacebookResponseException $e) {             return 'Graph returned an error: ' . $e->getMessage();         } catch(\Facebook\Exceptions\FacebookSDKException $e) {             return 'Facebook SDK returned an error: ' . $e->getMessage();         }     } 

I already checked content of $message and env('FACEBOOK_ACCESS_TOKEN'), everything is OK.

But I always get :

Undefined array key 1 

on post() method.

I am using "facebook/graph-sdk" package.

Is it mandatory to have a FB app up and running ? Mine is not published, but it is asking me a bunch of things, like Business verification that is not very relevant, as I do it for myself...

Do you have any idea how should I fix the issue ?

I'm currently building a portfolio for a social media celebrity using Laravel 11 + vue3 composition API

I am at the point where I created a meta dev account and created an app and setup IG basic display API on it. Now I am not sure if I can fetch that user's posts without obtaining any tokens or anything from their side. Long story short: Can I do something similar to this

Graph.instagram.com/[their_professional_account_id]/media?access_token=[my_app's token]

I don't want to ask them for any access tokens at all as they have 650k+ followers and I don't want to be involved in any access to their professional account.

I tried looking online for demos and examples but had no luck finding any and most articles are all about the deprecated __a?