Posts under category facebook-graph-api

Using the graph API pages search to pull in locations, e.g.

pages/search?q=Scranton&fields=id,name,location,link

I used to be able to pull in results such as:

  • Rockville Centre, New York (108007899221124)
  • Lakeland Florida (334882786648235)

Now, only specific page-backed addresses are pulled in. I see this behavior in other meta connected apps I've tried, is there a change I am unaware of?

A search for Lakeland Florida used to pull in that location / ID as recently as a couple of weeks ago. Many other generic place names are missing.

I have created an app on the Facebook developer account and I'm using those details to implement Facebook login in my react-native app. Are there any settings available on the Facebook Developer Account where I can allow login specifically only for my react-native app E.g. by specifying my package name so that the login works only for the app with that package name.

I have developed a Facebook app using Facebook Login for Business where the logged in user can allow the app to retrieve a list of pages the logged in user manages. To get permission for pages_show_list feature, I had to add 'Facebook Login for Business' product to the app and the request got approved by the Facebook App Review team.

However now when I try to login to the Facebook app from a user (that is not listed in the app's user roles) I get "It looks like this app isn't available" soon after the login in the popup. The app is Live but still I get that error. I am trying to implement the same functionality as Senja.io does and they do the same thing and anybody whether they manage pages or not, a business owner or not they can still login and the page selection screen is presented to them. But in my app after someone logs in it shows "It looks like this app isn't available".

I referred the following question on StackOverflow but I couldn't get a proper solution from it. "It looks like this app isn't available" Facebook App Login Error

I have created a separate configuration under Facebook Login for Business and included it in the Facebook login JS code, but there is still no luck with it.

Configuration setting:

Login variation: General

Access token: System-user access token (I used User access token as well but no luck)

Choose token expiration: 60 days

Assets: Pages - Asset required

Permissions: pages_show_list, pages_read_engagement, pages_read_user_content

HTML:

<button onclick="login()">Login with Facebook</button> 

JS:

window.fbAsyncInit = function() {   FB.init({     appId      : '48XXXXXXXXXXX57',     cookie     : true,     xfbml      : true,     version    : 'v20.0'   });   FB.AppEvents.logPageView();    }; (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')); function login() {   FB.login(     function(response) {         if (response.authResponse) {           console.log('Welcome! Fetching your information.... ');           FB.api('/me', function(response) {             console.log('Good to see you, ' + response.name + '.');             getManagedPages();           });         } else {           console.log('User cancelled login or did not fully authorize.');         }       },        {       config_id: '81XXXXXXXXXXX93',       scope: 'pages_show_list, pages_read_engagement, pages_read_user_content'    }); } 

The error I get presented is "app being not available". Is there a way to publish the app? I have been struggling with this for over a month now and I cannot find a solution. Only the app's Admins, Developers, Testers can get through the login step and choose pages. Please help.

I'm attempting to use Meta's OAuth login for a project, however, the dialog is always a complex multi-step process. Several other sites have a simple, 1-click dialog. I noticed that whether I use the SDK or url, it ends up being the same result. Additionally, the url for the 1-click dialog is much longer and always starts with "https://www.facebook.com/privacy/consent/gdp/?params%5Bapp_id%".

1-click Dialog Multi-step Dialog

Ss there any way to get the simpler login dialog on my end, or is it up to Meta?

I tried using both the SDK and a manual login with differing login settings. I also tried adding and removing scopes as well as all the possible auth_types to no avail. I also am testing in live mode/production.

I'm integrating Facebook Business Login using the Facebook JS SDK. Despite following many tutorials and the official guide, I've encountered a persistent issue over the past few days. I believe this might be an edge case specific to my setup.

The problem

Both FB.getLoginStatus() and FB.login() call functions return below response.

{authResponse: null, status: 'unknown'}  

I'm certain I've logged into Facebook and it should show "connected" instead. The issue is that callback functions are being triggered before Facebook returns the response. For example, when FB.login() opens the login dialog, the console shows the callback response before login completion. Additionally, after completing the login, the callback function is no longer called. Here is a screenshot:

Here is the source code

(I just copy-pasted from Facebook Offical Guide)

    <!DOCTYPE html> <html> <head> <title>Facebook Login JavaScript Example</title> <meta charset="UTF-8"> </head> <body> <script>   function statusChangeCallback(response) {  // Called with the results from FB.getLoginStatus().     console.log('statusChangeCallback');     console.log(response);                   // The current login status of the person.     if (response.status === 'connected') {   // Logged into your webpage and Facebook.       testAPI();       } else {                                 // Not logged into your webpage or we are unable to tell.       console.log( 'Please log ' +         'into this webpage.');         FB.login((response) => {           console.log(response)         },{             "config_id":{{FACEBOOK_CONFIG_ID}}         })     }   }   function checkLoginState() {               // Called when a person is finished with the Login Button.     FB.getLoginStatus(function(response) {   // See the onlogin handler       statusChangeCallback(response);     });   }   window.fbAsyncInit = function() {     FB.init({       appId      : '{{FACEBOOK_APP_ID}}',       cookie     : true,                     // Enable cookies to allow the server to access the session.       xfbml      : true,                     // Parse social plugins on this webpage.       version    : 'v20.0'           // Use this Graph API version for this call.     });     FB.getLoginStatus(function(response) {   // Called after the JS SDK has been initialized.       statusChangeCallback(response);        // Returns the login status.     });   };     function testAPI() {                      // Testing Graph API after login.  See statusChangeCallback() for when this call is made.     console.log('Welcome!  Fetching your information.... ');     FB.api('/me', function(response) {       console.log('Successful login for: ' + response.name);       document.getElementById('status').innerHTML =         'Thanks for logging in, ' + response.name + '!';     });   } </script> <!-- The JS SDK Login Button --> <fb:login-button config_id="{{FACEBOOK_CONFIG_ID}}" onlogin="checkLoginState();"> </fb:login-button> <div id="status"> </div> <!-- Load the JS SDK asynchronously --> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script> </body> </html> 

My Environment

I use Facebook Business Login so I can ask my clients permission to manage their pages. I've configured User Access Token configuration and included my Config ID in both login button and in FB.login() function. My Business is verified. I'm testing this in localhost. (I have local ssl and I use HTTPS. Also I've deployed this in my live web app where i have https as well and facing the same problem). My App is in Live mode.

Below are some screenshots from my app configs. I'm trying to give lot of details as I beleive this might be specific to my app configurations.

What I've Tried

  1. I've tried both FB.login() and Facebook login Button. (with facebook login button the onlogin callback function never getting called)

  2. I've deleted ALL my cookies and files

  3. I've deployed this in Live web app

UPDATE

There is a fblo_<app_id> cookie, which my research indicates is a Facebook logout cookie, defaulting to a value of "y". When I manually delete this cookie, the status changes to "connected" (sometimes this works and sometimes not.). However, it's not feasible to ask my clients to perform this action on their end. Additionally, the callback functions are still being triggered before the login (reconnect) process is complete. So maybe there might be an issue related to cookies or sessions.