iphone - Does Facebook SDK distinguish between iOS debug vs release build -
does facebook distinguish between debug , release ios builds? testing app before submitting new build itunes. app uses single permission of posting photo on facebook (i.e. publish_actions). strange thing when test facebook account, goes through fine. when test partner's facebook account, not go through: developer account linked facebook account; not partner's. following method
// convenience method perform action requires "publish_actions" permissions. - (void)performpublishaction:(void(^)(void))action { // defer request permission post moment of post, check permission if ([fbsession.activesession.permissions indexofobject:@"publish_actions"] == nsnotfound) { // if don't have permission, request nslog(@"requesting publish permission"); [fbsession.activesession requestnewpublishpermissions:@[@"publish_actions"] defaultaudience:fbsessiondefaultaudiencefriends completionhandler:^(fbsession *session, nserror *error) { nslog(@"completion handler returns permission"); nslog(@"my permissions are: %@",session.permissions); if (!error) { nslog(@"okay no error"); action(); } else if (error.fberrorcategory != fberrorcategoryusercancelled) { nslog(@"error getting permission:: %@",error); } }]; } else { nslog(@"the other route"); action(); } }
action()
never called.
the line
nslog(@"my permissions are: %@",session.permissions);
prints
my permissions are: ( "public_profile" )
and line
nslog(@"the error is: %@",error);
prints
the error is: error domain=com.facebook.sdk code=2 "the operation couldn’t completed. com.facebook.sdk:errorreauthorizefailedreasonusercancelled" userinfo=0x1702779c0 {com.facebook.sdk:errorloginfailedreason=com.facebook.sdk:errorreauthorizefailedreasonusercancelled, nslocalizedfailurereason=com.facebook.sdk:errorreauthorizefailedreasonusercancelled, com.facebook.sdk:errorsessionkey=<fbsession: 0x170169480, state: fbsessionstateopen, loginhandler: 0x100374240, appid: 123456789, urlschemesuffix: , tokencachingstrategy:<fbsessiontokencachingstrategy: 0x17022a740>, expirationdate: 2015-05-19 19:07:02 +0000, refreshdate: 2015-03-20 19:07:02 +0000, attemptedrefreshdate: 0000-12-30 00:00:00 +0000, permissions:( "public_profile" )>}
nopes facebook doesnt distinguish between debug , release ios builds. thing havent unable application general user mood. made login avilable general user have unable application in https://developers.facebook.com/ have register applications
- first go https://developers.facebook.com/ , login developer account
- click on apps , select application have registered
3.click on settings option , enter email in contact email option , save changes 4.click on status & review , make yes
you saw following dialogue click on confirm
now able login of facebook account
Comments
Post a Comment