Facebook 在应用程序 xcode 中登录?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13834370/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Facebook login in app xcode?
提问by Sindhia
I have seen many have been asking this question but I m confused... I want to integrate facebook login in my iphone app.Im need to provide login options i.e login with our website account or facebook login and use our app.But I have gone through google and found the tutorials providing facebook login feature with the total access (like post ,update etc) i.e login with facebook and do respective facebook activities.But I dont need all of them.I just need the functionality of login with user facebook account and access our app.And one more thing I have seen to download facebook sdk from git and copy FBConnect folder.But there is not such folder in it.I m confused
我看到很多人一直在问这个问题,但我很困惑......我想在我的 iphone 应用程序中集成 facebook 登录。我需要提供登录选项,即使用我们的网站帐户或 facebook 登录并使用我们的应用程序。但我有通过谷歌,找到了提供 facebook 登录功能和总访问权限(如发布、更新等)的教程,即使用 facebook 登录并执行相应的 facebook 活动。但我不需要所有这些。我只需要使用用户 facebook 登录的功能帐户并访问我们的应用程序。我还看到另一件事是从 git 下载 facebook sdk 并复制 FBConnect 文件夹。但是里面没有这样的文件夹。我很困惑
where can I find the best tutorial which suites my particular criteria..?
我在哪里可以找到适合我的特定标准的最佳教程..?
Please guide me in this aspect.
请在这方面指导我。
回答by Abi
I think this will help you,have a look : http://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/
我认为这会帮助你,看看:http: //developers.facebook.com/docs/tutorials/ios-sdk-tutorial/
回答by abi
You can download the facebook sdk from here : http://developers.facebook.com/ios/
您可以从这里下载 Facebook sdk:http: //developers.facebook.com/ios/
Then to bypass fb app and safari and to continue with your app you can change the code in Facebbok.m
然后绕过 fb 应用程序和 safari 并继续使用您的应用程序,您可以更改 Facebbok.m 中的代码
[self authorizeWithFBAppAuth:YES safariAuth:YES];
to
到
[self authorizeWithFBAppAuth:NO safariAuth:NO];
in the method
在方法中
- (void)authorize:(NSArray *)permissions
delegate:(id<FBSessionDelegate>)delegate
回答by SachinVsSachin
If you want to implement to access your app login via facebook, firstly you should get the id(for example:19292868552) of user after succefully facebook login. And with the help of id you can uniquely identify the user in your database.
如果您想实现通过facebook访问您的应用程序登录,首先您应该在成功登录facebook后获取用户的id(例如:19292868552)。在 id 的帮助下,您可以唯一标识数据库中的用户。