When using the Instagram Graph API to retrieve conversations, I am experiencing an issue where the cursor "after" value remains the same, and the data for the next page is identical to the first page. Despite multiple requests, the cursor does not update, which prevents access to subsequent data pages. Example API call: /v20.0/[fb_page_id]/conversations?platform=instagram&fields=id,name,participants,updated_time,messages.limit(1),subject&limit=5 Response:
{ "data": [...], "paging": { "cursors": { "after": "ZAXlKMGFXMWxjM1JoYlhBaU9qRTNNak0xTkRRMk5qTXpNamNzSW5Sb2NtVmhaQUY5cFpBQ0k2SWpNME1ESTRNak0yTmpnME1UY3hNRE13TVRJME5ESTFPVFkyT1RFM09EVXpNak01T1Rnek55SjkZD" }, "next": "......" } }
The cursor "after" value does not change, and the result remains the same for the next page. It is a bug.
This problem persists and prevents pagination from working correctly. Could you provide guidance on how to resolve this issue?
Thank you for your assistance.

I'm setting up the WhatsApp/Meta embedding tool and trying to make it automatically set up everything automatically for programmatic receiving and sending messages to WhatsApp.

The issue I'm facing is that I'm not a valid client code after successful . These are all the steps my application is taking:

Allowing the user to go through the embedding tool At the end, I receive a token from the embedding tool I want to trade it in that token, for an access token but facebook graph api throw an error saying "Malformed access token" or "This authorization code has expired".

     window.addEventListener('message', (event) => {         if (event.origin !== "https://www.facebook.com" && event.origin !== "https://web.facebook.com") {             return;         }         try {             const data = JSON.parse(event.data);             if (data.type === 'WA_EMBEDDED_SIGNUP') {                 // if user finishes the Embedded Signup flow                 if (data.event === 'FINISH') {                     const {                         phone_number_id,                         waba_id                     } = data.data;                     console.log("Phone number ID ", phone_number_id, " WhatsApp business account ID ", waba_id);                     // if user cancels the Embedded Signup flow                 } else if (data.event === 'CANCEL') {                     const {                         current_step                     } = data.data;                     console.warn("Cancel at ", current_step);                     // if user reports an error during the Embedded Signup flow                 } else if (data.event === 'ERROR') {                     const {                         error_message                     } = data.data;                     console.error("error ", error_message);                 }             }             document.getElementById("session-info-response").textContent = JSON.stringify(data, null, 2);         } catch {             console.log('Non JSON Responses', event.data);         }     });          const fbLoginCallback = (response) => {         if (response.authResponse) {             const code = response.authResponse.code;             // The returned code must be transmitted to your backend first and then             // perform a server-to-server call from there to our servers for an access token.             FB.api(                 "/debug_token?input_token=" + code,                 function (response) {                     if (response && !response.error) {                         /* handle the result */                         console.log(response);                         console.log('here12')                     }                      }             );         }         document.getElementById("sdk-response").textContent = JSON.stringify(response, null, 2);          }          const launchWhatsAppSignup = (e) => {         event.preventDefault();              // Launch Facebook login         FB.login(fbLoginCallback, {             config_id: '1707717083377865', // configuration ID goes here             response_type: 'code', // must be set to 'code' for System User access token             override_default_response_type: true, // when true, any response types passed in the "response_type" will take precedence over the default types             scope: "business_management, whatsapp_business_management, whatsapp_business_messaging",             extras: {                 setup: {},                 featureType: '',                 sessionInfoVersion: '2',             }         });     }     window.fbAsyncInit = function () {         FB.init({             appId: '521724357037484',             autoLogAppEvents: true,             xfbml: true,             version: 'v20.0'         });     };                               

Wanting to track 'Add to Cart' clicks on a WooCommerce store & Google Ads tell me I need to call gtag_report_conversion when any 'Add to cart' button is clicked on the site.

Some buttons are a link <a href="... etc"> using class="add_to_cart_button" - see example page

While other buttons are a <button> tag using class="single_add_to_cart_button" - see example page

I see from Google's instructions that the structure for a link is:

<a onclick="return gtag_report_conversion('http://example.com/your-link');"href="http://example.com/your-link">Add To Cart</a>

And the structure for a <button> tag is:

<button onclick="return gtag_report_conversion('http://example.com/your-link')">Add To Cart</button>

How can I construct a function hook that will create the above link / button tag structure & would it be an action or filter hook? Also, is it possible to use the classes mentioned earlier to define which buttons on the site should be affected by this particular function. The documentation showing what action & filter hooks are available for WooCommerce is here.

I have the permissions public_profile, email, pages_read_engagement, instagram_basic, instagram_manage_insights, pages_show_list, read_insights, business_management. When I make a request to the API https://graph.facebook.com/v19.0/{your-user-id}/accounts?access_token={user-access-token} using a user ID and user access token, I sometimes get account data for some users, but for others, I receive empty data.

I encountered this issue before adding the business_management permission. After adding that permission, everything worked fine, but starting yesterday, users have been notifying me that they can't get account info.

I'm working on a Gatsby.js project that displays ads correctly in production, but not in localhost.

An iframe is supposed to be inserted into the Ad component via a script that is generated by the 'gatsby-browser.js' file. To facilitate this, I've also added another script in the 'gatsby-ssr.js' file to append Google Tags to the Window object, since I was having trouble doing this via the 'onClientEntry' function.

So far, I can generate the required Window objects, and append the script tag to the head tag in the HTML document, but still cannot generate the iframe.

Ad component

import React, { Component } from 'react' class Ad extends Component {   componentDidMount(){     const script=document.createElement('script')     script.src=`${adEmbedCodeURL}`     script.defer=true;     script.setAttribute("data-can-ad","true")     this.instance.appendChild(script)        }   render() {     return (     <div className=`${class-name}` ref={el => (this.instance = el)} >         <p>Advertisement</p>     </div>     )   } } export default AdMPU 

gatsby-browser.js

export const onClientEntry= () => { if (typeof __canGDPR == 'function') {      console.log('onClientEntry')     window.__canGDPR(function() {       console.log('onClientEntry - CANS')       var createScript = function(url, callback) {         var script = document.createElement('script');         script.src = url;         if (callback) {           script.onload = callback;          }document.getElementsByTagName('script')[0].appendChild(script);       };       createScript(`https://www.googletagmanager.com/gtag/js?id=${containerID}`);       window.dataLayer = window.dataLayer || [];       function gtag(){         window.dataLayer.push(arguments);       }gtag('js', new Date());       gtag('config', `${containerID}`);     }); }; } export const onRouteUpdate = () => {     console.log('onRouteUpdate'); if (typeof __canGDPR == 'function') {      window.__canGDPR(function() {       console.log('onRouteUpdate - CANS')       var createScript = function(url, callback) {         var script = document.createElement('script');         script.src = url;         if (callback) {           script.onload = callback;          }document.getElementsByTagName('script')[0].appendChild(script);       };       createScript(`https://www.googletagmanager.com/gtag/js?id=${containerID}`);       window.dataLayer = window.dataLayer || [];       function gtag(){         window.dataLayer.push(arguments);       }gtag('js', new Date());       gtag('config', `${containerID}`);     }); }; } 

gatsby-ssr.js

import React from 'react' export const onRenderBody = ({ setHeadComponents }) => {     setHeadComponents ([     <script       key="SGCCansAds"       src=`${adEmbedCodeURL}`     />,     <script        key="jQuery"        src="https://code.jquery.com/jquery-3.3.1.min.js"     />,     <script     key="gtm-script"     async     src=`https://www.googletagmanager.com/gtag/js?id=${containerID}`   />,   <script     key="gtm-initializer"     dangerouslySetInnerHTML={{       __html: `         window.dataLayer = window.dataLayer || [];         function gtag(){ window.dataLayer.push(arguments); }         gtag('js', new Date());         gtag('config', `${containerID}`);       `,     }}   />,   ]) }