ngFacebook icon indicating copy to clipboard operation
ngFacebook copied to clipboard

question on $facebook.api

Open josselinchevalay opened this issue 9 years ago • 3 comments

must be going through $ facebook.login used for $ facebook.api ?

i attempt this :

fb.getInfos = function(id, handler) {
        $facebook.api("/"+id, {fields:"picture, name"})
                 .then(function(response){
                    handler(response);
                 });
};

when my user and passed through authentication it works but I would in some cases be able to use this method even if the current user is not authenticated but it did not seem to work

Best regards

josselinchevalay avatar Aug 15 '15 09:08 josselinchevalay

+1 on this, for some reason if I'm not logged into facebook the $facebook.api promise never seems to get resolved. I'm sick now but I need this to work whether the user is logged in or out of facebook so either I'll end up creating my own facebook module or I'll submit a PR here if it doesn't get addressed in the next few weeks :p

brainTrain avatar Jan 07 '16 00:01 brainTrain

(+1)

josselinchevalay avatar Jan 07 '16 13:01 josselinchevalay

@josselinchevalay I submitted a PR here: https://github.com/GoDisco/ngFacebook/pull/66

the last PR that was closed here was in July so I'm not sure how active the owners of this repo are. I'm reasonably sure that this change I made shouldn't do any harm to existing consumers of the plugin but you know, bugs happen :p

anyway, feel free to ghetto-merge that change if you need to (i.e. fork this repo and make my change in your fork and consume the plugin from your fork rather than this one or NPM or however you're doin it now)

brainTrain avatar Jan 07 '16 17:01 brainTrain