ios - How not to ask for publish permission everytime? -
i did in facebook
[self vsuspendandhaltthisthreadtillunsuspendedwhiledoing:^{ [[nsoperationqueue mainqueue] addoperationwithblock:^{ [self.acastore requestaccesstoaccountswithtype:self.acaccounts options:[self dicpostoptions] completion:^(bool granted, nserror *error) { self.bpermissiontoaccessstoregranted=granted; [self vcontinue]; }]; }]; }];
basically asking publish permission. want check whether such publish permission has been granted or not before asking again.
how so?
to check permissions available:
if(![postrequest.session.permissions containsobject:@"publish_actions"])
Comments
Post a Comment