Facebook Login - Feature Unavailable
I am trying to implement Facebook login for my application. It was working well in development mode, but when I try to switch to live mode I see this message:
Feature Unavailable
Facebook Login is currently unavailable for this app, since we are updating additional details for this app. Please try again later.
I do not have any required actions in developer console.
I have searched for an answer, I have already set advanced access to email and public profile, and I got advanced access to other permissions as well. Business verification is complete and I have verified my Business as a tech provider as well.
Here is the code that handles the Facebook login (I am using Django framework):
def facebook_login(request): facebook_auth_url = "https://www.facebook.com/v21.0/dialog/oauth" if "test" in request.get_full_path(): redirect_uri = request.build_absolute_uri('/test/home/facebook_login/facebook_callback/') redirect_uri = "http://localhost:8000/home/facebook_login/facebook_callback/" else: redirect_uri = request.build_absolute_uri('/home/facebook_login/facebook_callback/') scopes = "pages_show_list,business_management,read_insights,ads_read,pages_read_engagement,ads_management" state = generate_state() request.session['oauth_state'] = state params = { 'client_id': settings.META_APP_ID, 'redirect_uri': redirect_uri, 'scope': scopes, 'response_type': 'code', 'state': state, } auth_url = f"{facebook_auth_url}?{urlencode(params)}" return JsonResponse({'authorization_url': auth_url}) def facebook_callback(request): error = request.GET.get('error') if error == 'access_denied': prefix = 'test/' if os.getenv('PROD') == 'blue' else '' cancel_redirect_url = ( "http://localhost/" + prefix + "#/home/connections" if os.getenv('DEVELOPMENT') == 'True' else "https://platform.webalyze.ai/" + prefix + "#/home/connections" ) return redirect(cancel_redirect_url) state = request.GET.get('state') if state != request.session.pop('oauth_state', None): return JsonResponse({'error': 'Invalid state parameter'}, status=400) code = request.GET.get('code') if not code: return JsonResponse({'error': 'No code provided'}, status=400) token_exchange_url = "https://graph.facebook.com/v21.0/oauth/access_token" redirect_uri = request.build_absolute_uri(request.path) print('REDIRECT (facebook_callback):', redirect_uri) params = { 'client_id': settings.META_APP_ID, 'redirect_uri': redirect_uri, 'client_secret': settings.META_APP_SECRET, 'code': code, } response = requests.get(token_exchange_url, params=params) data = response.json() if 'access_token' in data: access_token = data['access_token'] saveMetaTokenToDatabase(request.user, access_token) prefix = 'test/' if os.getenv('PROD') == 'blue' else '' if os.getenv('DEVELOPMENT') == 'True': return redirect("http://localhost/" + prefix + "#/home/connections") else: return redirect("https://platform.webalyze.ai/" + prefix +"#/home/connections") else: return JsonResponse({'error': 'Failed to obtain access token'}, status=400)
What am I missing so I can do this in live mode?