I have found that in the Facebook.m class I can do this:
[self authorizeWithFBAppAuth:NO safariAuth:NO];
I changed each of these from YES to NO as I d开发者_如何学Con't want to user to leave my application to authorise my application.
However now having done that I get no in-app prompt of any kind to authorise, so how can I authorise myself now inside my application without the user going to either Safari or the Facebook app to authorise?
Thanks.
i see what your problem is.
in my opinion get the latest https://github.com/facebook/facebook-ios-sdk and then override
[device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported]
in facebook.m to always return false line 160
Because Facebook (and Twitter) use oAuth, you need to use a webpage to run the authorization. However, using a webpage to do authorization is not the same as leaving your app to do authorization.
I believe the way that Facebook authorization in many apps is done with a UIWebView in the app. You can have a look at ShareKit and how they've implemented several "in app" authorizations for various services.
精彩评论