Thursday, 15 April 2010

ios - Parse: [PFFacebookUtils reauthorizeUser:] callback never gets called -



ios - Parse: [PFFacebookUtils reauthorizeUser:] callback never gets called -

i'm using parse framework social authentication. app has simple method requests post permission on facebook.

my problem: the block pass reauthorizeuser: never gets called!

+(void)acquirepublishpermissionsforuser:(dhuser *)user withcompletion:(void (^) (bool succeeded, nserror *error))completion { [pffacebookutils reauthorizeuser:user withpublishpermissions:@[@"publish_actions"] audience:fbsessiondefaultaudiencefriends block:^(bool succeeded, nserror *error) { completion(succeeded, error); }]; }

this method works fine. in case, facebook app opens , prompts permission. upon hitting ok, you're returned app. both openurl & applicationdidbecomeactive called.

this in app delegate:

- (bool)application:(uiapplication *)application openurl:(nsurl *)url sourceapplication:(nsstring *)sourceapplication annotation:(id)annotation { // handle facebook authentication homecoming [fbappcall handleopenurl:url sourceapplication:sourceapplication withsession:[pffacebookutils session]]; } - (void)applicationdidbecomeactive:(uiapplication *)application { // handle facebook authentication [fbappcall handledidbecomeactivewithsession:[pffacebookutils session]]; }

i've set breakpoint verify: block never gets executed. it's important, because want post facebook after permission. otherwise it's kinda useless.

any ideas?

i ended using straight fb-api phone call ([[fbsession activesession] requestnewpublishpermissions]).

it weird stuff session , auth token data, @ to the lowest degree callback gets executed. not real solution it'll do.

ios objective-c facebook parse.com

No comments:

Post a Comment