Posts tagged with facebook-graph-api

Is there a way to fetch the granular results for page_post_engagements, likes,commnents ect for the period selected. The below is currently just giving me the overall total

/insights?metric=page_post_engagements

{ "name": "page_post_engagements", "period": "days_28", "values": [ { "value": 2, "end_time": "2025-01-01T08:00:00+0000" }, { "value": 2, "end_time": "2025-01-02T08:00:00+0000" } ], "title": "28 Days Post Engagements", "description": "28 Days: The number of times people have engaged with your posts through like, comments and shares and more.",

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.

here is the exact error I get

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?

Issue: Getting 'Unsupported post request' error when accessing /accounts with WABA_ID despite having all required permissions:

  • whatsapp_business_messaging
  • whatsapp_business_management
  • Tech Provider verification
  • Full business verification

Error: 'Unsupported post request. Object with ID '[WABA_ID]' does not exist, cannot be loaded due to missing permissions.'

Tried:

  • New phone numbers
  • Fresh access tokens
  • Different WABA_IDs
  • Permission resets

Note: Can successfully send messages via API, but contacts API access fails. Request format appears correct, but permissions seem blocked despite having all verifications.

Meta support directs all technical issues to their Developer Forum, but the forum throws a ReactComponent error, making it inaccessible. Left without official support channels to resolve this.

I'm trying to setup webhook for Facebook webhook, I got my php script to run just fine with the test feed. The app is subscribed to the "Feed", as I want to get if a post is made on our public page. But eventho my app now is Live, I'm still not recieving any post requests other than the test one, when I test it.

I read the documentation, and it seems like its cause it need "pages_read_engagement" permision via App Review.

But here is my problem, how do I request for this permision, as a app review want you to have a Facebook login on page and such, but when its just a webhook that recieves, translates and put into our database to be displayed on website, it realy does not use login an such.

Any one know how to do this, I've been stuck on this for some time now.