开发者

Facebook SDK iOS - Authorise In-App?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜