AlmogBaku / ngFacebook

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

question on $facebook.api #55

Open josselinchevalay opened 9 years ago

josselinchevalay commented 9 years ago

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

brainTrain commented 8 years ago

+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

josselinchevalay commented 8 years ago

(+1)

brainTrain commented 8 years ago

@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)