Posts tagged with facebook-graph-api

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

We are building a platform for WhatsApp business messaging. For this, we need to test the product catalog messaging APIs.

However, it seems there is no way to do so without creating a public business account and adding a payment method.

Is there a means to access the APIs without going through the above steps? Especially the payment method as we do not wish to start paying for testing our product before going live.

We have created a product catalog and connected it to the WhatsApp business account on an actual phone number. But we cannot send messages without adding a payment method.

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?