javascript - facebook get data without permission -


ok, have app, written in javascript, integrate facebook api working. make sure user logged in , app had permission dynamic list of permissions. code inside method use tell if user logged in , has permissions. know recursive, that's why have unsubscribe when returning true, has boolean subscribe once. uses jquery 1.5+ utilizing jquery deferred functionality. http://api.jquery.com/category/deferred-object/

fb.getloginstatus(function (response) {   if (response.status === 'connected') {     fb.event.unsubscribe('auth.authresponsechange');     dfd.resolve(true);   }   else if (response.status === 'not_authorized' || response.status === 'unknown') {     if (facebookauthnotsubscribed) {       facebookauthnotsubscribed = false;       fb.event.subscribe('auth.authresponsechange', function () {         repeat = false;         self.valid().done(function (returnvalid) {           if (returnvalid) {             dfd.resolve(returnvalid);           }         });       });     }     fb.login(null, { scope: permissionlist });   }   else {     errorallatime();     dfd.resolve(false);   } }, { scope: permissionlist }); 

the permission list built before block, , seems work. "email,user_hometown,user_location" this.

this seems work first time, aka user prompted permissions. if run again, user not asked, , data returned when queries run.

am doing wrong, or has fb changed recently? did not see on change logs...

edit: seems did not closely @ doing, not fb returning data app has no permission for, there no prompt more permission after first time user logs app.

answer: seems on page: https://developers.facebook.com/docs/reference/javascript/fb.getloginstatus/

states getloginstatus checks if user logged in or if app has permission user, not permissions app has. such, no surprise changed no warning.


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -