AlmogBaku / ngFacebook

DEPRECATED Angular facebook service
MIT License
261 stars 70 forks source link

Error: "An active access token must be used to query information about the current user." #73

Open ibrahimmumcu opened 8 years ago

ibrahimmumcu commented 8 years ago

I'm trying to get user status on page load.

$facebook.api("/me").then( 
      function(response) {
        $scope.welcomeMsg = "Welcome " + response.name;
        $scope.isLoggedIn = true;
      },
      function(err) {
        $scope.welcomeMsg = "Please log in";
      });

I did exactly what you did on demo page but I'm getting this error: An active access token must be used to query information about the current user.

I did some research and found it: http://stackoverflow.com/questions/26709869/an-active-access-token-must-be-used-to-query-information-about-the-current-user but it's not working either.

Any help appreciated.

tydanielson commented 8 years ago

I recently ran into this problem... If you haven't already solved it what you want to do is delete the localstorage cookie and fb cookie on the site you're working on. In my case that was localhost. As soon as its deleted without refreshing the page login to facebook again. This will reset the values and auto login your user. I suspect this library might not be doing everything to clear the cookies on a facebook logout, but I haven't spent any time looking into the details.