ios - facebook login works on iphone simulator but not on iphone device -


in app, want take photos facebook. used facebook ios sdk. can able authorize below code:

 if (appdelegate.session.isopen) {              //[appdelegate.session closeandcleartokeninformation];             [self retrievealbums];          } else {             if (appdelegate.session.state != fbsessionstatecreated) {                 // create new, logged out session.                 appdelegate.session = [[fbsession alloc] init];             }              // if session isn't open, let's open , present login ux user             [appdelegate.session openwithcompletionhandler:^(fbsession *session,                                                              fbsessionstate status,                                                              nserror *error) {                 // , here make sure update our ux according new session state                 //nslog(@"%@",session.accesstokendata.accesstoken);                 [self retrievealbums];             }]; 

it works fine on iphone simulator. can't able login on iphone 4 device. when tried login open safari , shows message updating. redirect without authorization. access token retrieved nil. cant able retreive images.

please me.

edit

thanks .finally solved problem. because enabled sandbox mode in facebook developer account settings. when disabled sandbox mode, works normally.

try clearing cookies , cache of safari, going settings. if not want app redirect safari, dont provide url scheme in info.plist "fb-appid-" , open popup login


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -