Posts tagged with facebook-messenger

Running into a unique issue here regarding Meta Graph API Webhooks, specifically for click-to-message ads. This is specific to click to message conversations - the app works perfectly for conversations initiated organically. The setup:

The user token used to generate the page access token has the following permissions: pages_show_list, ads_management, ads_read, business_management, pages_messaging, leads_retrieval, pages_read_engagement, pages_manage_metadata, pages_read_user_content, pages_manage_ads, pages_manage_posts, pages_manage_engagement, public_profile

The page access token generated via this user token has the following permissions: pages_show_list, ads_management, ads_read, business_management, pages_messaging, leads_retrieval, pages_read_engagement, pages_manage_metadata, pages_read_user_content, pages_manage_ads, pages_manage_posts, pages_manage_engagement, public_profile

The Meta application is subscribed to the following web hook fields feed, leaden, message_echoes, messages, messaging referrals

This setup works perfectly for messenger conversations that start organically. However, no message data is received via the web hook for those initiated via an advertisement (click to message). Only the 'referral': {'source': 'ADS', 'type': 'OPEN_THREAD'... web hook is sent, which has no details on the message itself. The same goes for outgoing messages in these threads - no web hook is sent for messaging_echoes.

The only workaround I currently have found that resolves this issue is to assign my personal Facebook account full admin (Everything) access directly at the page level or via the Business Manager that directly owns the Facebook page. Webhooks start firing for click to message ads once this is done.

However, if I am assigned full admin (Everything) access to the page through a partner Business Manager, the webhooks for click to message ads do not fire for click to message ads. They do fire for organic messenger threads.

Is anybody aware of a possible solution here?

I am currently developing a application that interacts with the Messenger API. Everything was working as expected until I submitted my app for a permissions review to Meta for the pages_messaging permission. After Meta’s review team tested the app by sending messages to the associated Facebook Page, the Messenger functionality for that Page stopped working entirely.

Here is what happens:

When I use the Access Token to make a request to me?, the response is successful, and I can retrieve basic Page information. However, when I try to query Messenger conversations using the /PAGE_ID/conversations endpoint, the following error is returned:

{   "error": {     "message": "An unexpected error has occurred. Please retry your request later.",     "type": "OAuthException",     "is_transient": true,     "code": 2,     "fbtrace_id": "AX_i_atlXLLuT2YAz5tkvl6"   } } 

Additional Observations: The issue occurs only for the Page tested by Meta's review team. Other Pages linked to the same application work without issues. The Access Token is valid and includes the necessary permissions (pages_messaging and pages_read_engagement). According to Meta Status, there are no ongoing disruptions for the Messenger API. The error is marked as is_transient: true, but retrying multiple times over hours/days still produces the same error. I have reviewed the Page's settings and permissions, and everything seems configured correctly.

Questions: What could cause the Messenger API to stop working specifically for a Page after Meta's review process? Is there any action I need to take to resolve this issue, such as resetting permissions, reassigning roles, or contacting Meta support? Could this issue be related to the permissions granted during the review process? If so, how can I verify this? How should I approach debugging this error further? For instance, is there a way to trace the problem using the provided fbtrace_id?

Any insights or guidance would be greatly appreciated!

I used the Access Token to call the Messenger API multiple times for the /PAGE_ID/conversations endpoint. I also verified that the Access Token has the required permissions (pages_messaging and pages_read_engagement) using the Graph API Explorer. I tested the /me endpoint with the same token, and it returned the expected Page data, confirming the token is valid.

I expected to receive a list of conversations for the Page, as it works correctly for other Pages linked to the same app. The Access Token should function properly because it is newly generated and has all the required permissions.

Instead of the expected response, the API returned the following error: json

{   "error": {     "message": "An unexpected error has occurred. Please retry your request later.",     "type": "OAuthException",     "is_transient": true,     "code": 2,     "fbtrace_id": "AX_i_atlXLLuT2YAz5tkvl6"   } } 

Additional Details:

This error happens only with the Page that was tested during the permissions review by Meta’s review team. Other Pages linked to the same application are working as expected and do not encounter this issue.

I am trying to set up a facebook messenger chatbot using dialogflow, and when I am trying to integrate both the services, I get this error message

com.google.dialogflow.bots.common.exceptions.BotWasNotStartedException: Code 400: (#100) You must set a Get Started button if you also wish to use persistent menu.

I tried the method referred in this question : get started button for fb messenger in dialog flow (get started button for fb messenger in dialog flow)

but it threw the error when I tried sending a POST request as given in the answer : "error": {"message": "(#100) Requires one of the params: get_started,persistent_menu,target_audience,whitelisted_domains,greeting,account_linking_url,payment_settings,home_url,ice_breakers,platform,title,description,commands", What do I do and how do I proceed from here? Is there a PHP or a JSON code that I must integrate? Or is there something else I can do about it?

Error message in dialogflow while trying to integrate messenger and dialogflow : com.google.dialogflow.bots.common.exceptions.BotWasNotStartedException: Code 400: (#100) You must set a Get Started button if you also wish to use persistent menu.

Error message while trying to send a POST request to set a Get Started button : "error": {"message": "(#100) Requires one of the params: get_started,persistent_menu,target_audience,whitelisted_domains,greeting,account_linking_url,payment_settings,home_url,ice_breakers,platform,title,description,commands",

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 encountering a problem with the transition from Facebook's Handover Protocol to the new Conversation Routing system. Previously, under the Handover Protocol, once the primary app (e.g., a chatbot) responded to a user query, the conversation would automatically move to the 'Done' directory. However, with the recent shift to Conversation Routing, this behaviour has changed. All conversations remain in the Main directory even though the default app has already replied to the user. This is causing difficulties for real agents using the Meta Business Inbox feature, as it's not clear whether a conversation is actively being handled by the bot or has been transferred to the Inbox app.

Current configuration: In my facebook page > Settings > Page Setup > Messenger Conversation Routing> Default App is set to my chatbot app In Page Setup > Advanced Messaging, I've tried both leaving the 'Primary Receiver for Handover Protocol' field empty and setting my app as the primary receiver I also noted that once you setup a default app for Conversation Routing, you can't remove it anymore.

Question: How can I ensure that conversations handled by the bot are marked as 'Done' once responded to, to maintain clarity for the agents in the Meta Inbox? Any advice or solutions would be greatly appreciated.