ccoenraets / OpenFB

Micro-library that lets you integrate browser and Cordova apps with Facebook with no plugin or SDK dependency.
MIT License
505 stars 231 forks source link

Login callback doesn't work. #111

Open ghost opened 7 years ago

ghost commented 7 years ago
openFB.init({appId: 'my_app_id'});
openFB.login(
        function(response) {
            $scope.text = JSON.stringify(response);
        }, {scope: 'user_friends,user_likes,user_tagged_places,user_events'});

After login my app returns to the page but it doesn't execute callback. Please, help me!

ahardworker commented 7 years ago

Hey! The problem is because of the fact that you injected in your body a Controller. Which messes up the scope.<body ng-app="starter" ng-controller="IBreakEverything"> If you have this, its probably what is killing your vibe. You either need to inject the controller via the routes, or else edit OpenFB.js in a way that it checks in the right scope.