Posts under category Meta & Facebook

Hello! I am working on an integration for leads with the ads I run on facebook and my CRM. For this I followed the steps on setting up an endpoint and configuring the webhooks product on the meta developer pages.
I managed to get a leadgen from the webhooks testing tool using the specific leadgen testing tool from the app's dashboard. I also checked and verified that my page-access token has the required rights to access and retrieve leads.
I however run into a problem trying to simulate the full lead ads testing tool (https://developers.facebook.com/tools/lead-ads-testing/) for simulating the entire process of making a lead and retrieving its data. My problem is that when I create a lead, the status of the test-lead stays on 'pending', and the Error Message displays 'Updated lead is still being processed and will be delivered shortly'. It seems as if the request is stuck.
I also verified that my app is indeed subscribed to the leadgen field using https://developers.facebook.com/docs/marketing-api/guides/lead-ads/quickstart/webhooks-integration/
I am using ngrok for tunneling the requests to my local environment, but that should not matter since I do receive the leadgen tests from the leadgen-specific testing tool.
Does anyone have any fix or idea what could be wrong?

In whatsapp cloud api Dashboard, under test number I get a message like this "Messaging may be unavailable. Review issue". , but it is still sending messages when i click the send message button, but my web hook has stopped working, it was working earlier

I am trying to implement whatsapp embedded signup flow for integrating whatsapp . Followed the documentation : https://developers.facebook.com/docs/whatsapp/embedded-signup/embed-the-flow/
embedded a simple button as login in to facebook

and the javascript for that is as follows
window.fbAsyncInit = function () {
// JavaScript SDK configuration and setup
console.log(facebookMetaData.metaAPPID)
FB.init({
appId: facebookMetaData.metaAPPID, // Meta App ID
cookie: true, // enable cookies
xfbml: true, // parse social plugins on this page
version: 'v19.0' //Graph API version
});
};

// Load the JavaScript SDK asynchronously
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

// Facebook Login with JavaScript SDK
function launchWhatsAppSignup() {
// Conversion tracking code
fbq && fbq('trackCustom', 'WhatsAppOnboardingStart', {appId: facebookMetaData.metaAPPID, feature: 'whatsapp_embedded_signup'});

// Launch Facebook login
FB.login(function (response) {
if (response.authResponse) {
const code = response.authResponse.code;
// The returned code must be transmitted to your backend,
// which will perform a server-to-server call from there to our servers for an access token
} else {
console.log('User cancelled login or did not fully authorize.');
}
}, {
config_id: facebookMetaData.configurationID, // 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
// extras: {
// setup: {
// ... // Prefilled data can go here
// }
// }
});
}
}
For the above javascript variable like facebookMetaData.metaAPPID are replaced properly.
when clicking the button i am getting the error in console as
Uncaught ReferenceError: fbq is not defined
launchWhatsAppSignup
How to resolve the issue so that whatsapp embedded signup can be implemented?