I am new to facebook's javascript sdk and am trying to get ads_read and ads_management permissions, I created an app added marketing api and Facebook Login for Business to it and added necessary permissions to its Configuration and followed the quickstart to get users SUAT but I am getting this response
{
"authResponse": null,
"status": "unknown"
}
here is my code for reference
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home</title>
</head>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'APP_ID',
autoLogAppEvents : true,
xfbml : true,
version : 'v17.0'
});
};
</script>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script>
<script>
function loginWithFacebook() {
FB.login(
function(response) {
console.log("response: ", response);
},
{
config_id: 'CONFIG_ID',
response_type: 'code'
}
);
}
</script>
<p>hi edit</p>
<button onclick="loginWithFacebook()">Login</button>
</body>
</html>