Posts under category facebook-graph-api

I've been able to success connect to Facebook Graph API for Instagram and now I have all messages and conversations stored and I also can send messages to any user I want, but, I'm trying to find two endpoints that seems impossible to:

  1. An endpoint or param to REPLY to a specific direct message, not just send a message to the user.
  2. An endpoint or param to mark a conversation as read, because besides I'm sending DMs via API, in the app the conversation still marked as unread.

Anyone have any idea?

Thanks!

I've tried to use Facebook endpoints but didn't worked, I also tried to copy Whatsapp but again it failed.

I have all permission replated "me/conversations" this endpoint in graph api but I still get below error "(#200) Requires permission: pages_messaging or User associated with the Page access token does not have an appropriate role on the Page" My final usecase is I have to connect page with google dilogflow and I have same error in there also

I have try with adding additional replated permissions

I'm encountering an issue while attempting to retrieve the current ad spend for our ad accounts on Meta (formerly Facebook) using the Graph API. The goal is to integrate this data into an external dashboard for better monitoring and analysis.

Here's the endpoint I'm using:

https://graph.facebook.com/v19.0/act_<ad_acc_id>/insights?level=ad&date_preset=today&fields=ad_name,spend 

However, upon making the request, I receive an empty response:

{   "data": [   ] } 

I've double-checked the endpoint parameters and they seem correct. Is there something I might be missing or doing wrong in this request that's resulting in an empty response?

I have a Facebook Login for Business button setup and when I have users of other businesses test it out, it does not grant them permissions that have been defined in the associated configuration id. Instead of granting the users all 5 permissions stated within the configuration it instead only grants them 'public_profile' and 'business_management'.

During developer testing a developer had access to the main Business as well as a client Business to verify that the process worked. When this user login's in and authorises, they are granted all 5 permissions. I have scoured the documentation and am unsure if I'm missing a step or some code.

I am unable to ask Facebook for help as they no longer accept GraphApi problems via their helpdesk. You can only post it on their public error forum in hopes that somebody else can chime in.

If it helps, the login button setup I am using is as follows:

<div     id="facebook-login-button"     className="fb-login-button"     data-width=""     data-size="medium"     data-button-type=""     data-layout=""     data-auto-logout-link="false"     data-use-continue-as="false"     data-config_id={facebookConfigurationId}     data-onlogin="onFacebookLogin" ></div> 

I'm using Python to create a script that allows me to create a label in the inbox (for a Facebook page), and then associate or tag a user with a specific label.

This is the function I made:

def associate_label_to_user(recipient_id, label_id, access_token): url = f"https://graph.facebook.com/v19.0/{label_id}/label?access_token={access_token}" data = {     "user": recipient_id } response = requests.post(url, json=data) response_json = response.json() # print(response_json) if response.status_code == 200:     success = response_json['success']     if success:         print("[LOGS] Association of label to user successful") else:     print("[LOGS] Error associating label to a user") 

I'm reading their documents here https://developers.facebook.com/docs/messenger-platform/identity/custom-labels/, and I'm not experiencing any other problem.

Whenever I run the script, it works (I see the user being labeled correctly), but I'm getting this error in return:

{'error': {'message': 'Unsupported request - method type: post', 'type': 'GraphMethodException', 'code': 100, 'fbtrace_id': 'ApHRHoVZFM_BUqHpOs3KdKX'}} 

I don't understand what this means, when it works for me anyway.