facebook ios api - How to send a synchronous graph request -
in ios 6 using facebook ios sdk 3.5 how can send graph request it's synchornious? or atleast how can synchronize response method?
i'm using following method:
+(void)hasusergrantedpermissions:(nsarray*)permissions andblock:(void (^)(bool))repeatblock{ [[fbrequest requestforgraphpath:@"/me/permissions"] startwithcompletionhandler:^(fbrequestconnection *connection, fbgraphobject* result, nserror *error) { if([[result valueforkey:@"data"] count] <1){ repeatblock(false); } fbgraphobject* grantedperms = [[result valueforkey:@"data"] objectatindex:0]; for(nsstring* requestedperm in permissions){ if (! [grantedperms valueforkey:requestedperm]){ repeatblock(true); } } }]; }
how can alter method or request in such way becomes synchronous?
thank you
Comments
Post a Comment