开发者

FB connect with Three20 - problem logging in facebook

I've started using Three20 and building a FB connect iPhone iOS app,

I'm trying to call [facebook authorize:permissionsArray delegate:self];

but it doesn't do anything, because the functions of FB trying to add subviews to the main window which doesn't exist in Three20 apps. I've tried to use safari authentication but it won't return to my app and complete the process.开发者_运维问答

Is there any other way signing in FB account via Three20 iOS apps?

Thanks!


I'm guessing the Safari authentication you are mentioning is the single sign on feature of the Facebook API. It just manifests itself as Safari if you are in the Simulator. If you are on a physical device w/ the Facebook App installed it will forward you to an authorization page in Facebook, or if already authorized will simply log you in.

I believe the piece you're missing on the single sign on is setting up a callback URL and registering that URL for your app in the .plist app configuration file.

Facebook has a pretty detailed tutorial on getting everything setup: https://developers.facebook.com/docs/guides/mobile/#ios

A specific URL needs to be registered in this file that uniquely identifies the app with iOS. Create a new row named URL types with a single item, URL Schemes, containing a single value, fbYOUR_APP_ID (the literal characters fb followed by your app id).

I'm also using the Three20 framework and the Facebook SDK and both should work fine together. Though there are enough steps to getting the Facebook SDK up and running that first time that it's a bit tricky to get going.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜