Posts tagged with facebook-graph-api

The user with an Id of xxxx-xxxx-xxxx-xxxx could not be stored as a Facebook audience member. The call failed to Facebook to save the user ("error":{"message": "Error validating access token: The session has been invalidated because the user changed their password or Facebook has changed the session for security reasons.", "type": "DAuthException","code":190, "error_subcode":460, "fbtrace_id"xyz"}}

Need to resolve this issue from production.

I need to get authenticated for Instagram API. I have a business profile. And I'm trying to authenticate via FB login via the JS SDK:

  <p id="profile"></p>   <script>     function checkLoginState() {       FB.getLoginStatus(function(response) {         statusChangeCallback(response);       });     }     window.fbAsyncInit = () => {       FB.init({         appId: 'xxxxxxxxxxxxxx',         cookie: true,          xfbml: true,         version: 'v19.0'       });       FB.login((response) => {         if (response.authResponse) {              console.log('Welcome!  Fetching your information.... ');              FB.api('/me', {fields: 'name, email'}, (response) => {               const msg = `Howdy ${response.name}. Your email address: ${response.email}`;               document.getElementById("profile").innerHTML = msg;              });         } else {            console.log('User cancelled login or did not fully authorize.'); }       });       FB.getLoginStatus((response) => {         if (response.status === 'connected') {           console.log(response.authResponse);           alert(`response.authResponse: ${response.authResponse}`);         }       });     }; </script> <!-- The JS SDK Login Button --> <fb:login-button scope="public_profile,email" onlogin="checkLoginState();"> </fb:login-button> <div id="status"> </div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script> 

I click the button, get redirected at FB, enter login/pass in the dialog window, enter 2FA code. And then it'll ALWAYS get stuck on this dialog, on the half-way:

with this url (modified):

What's going on here?

I'm working on a small python script to automate a daily post to a page my wife manages. It downloads a pic, merges with a header, and posts to the page with a URL and some text. My idea is ultimately to drop this on a Linux box I have and schedule it to fire once a day. If I do go to automate it, I'm wondering if there's a way to check and make sure the post hasn't already been done. The text is consistent (and unique as it has the date in it). Is there a way to have the script search the page for the text before posting? Searches so far haven't yielded much.

I currently try to get once per day all stories which are posted on one of my facebook business pages. But when I execute the request I always get only 1 story in return even when there are multiple stories posted.

I'm using the following endpoint url:

https://graph.facebook.com/v19.0/{{page_id}}/stories?limit=25

As I get one story, I assume that this is not an authentication issue. What could be the reason for that and do you have any proposals on how I could ensure to always receive all active stories?

Thank you! Jannik