简体   繁体   English

移动Facebook登录-应用程序设置提供的凭据

[英]Mobile facebook login - credentials provided by app settings

I managed to post status updates on facebook walls and log in via the following code: 我设法在Facebook墙上发布状态更新,并通过以下代码登录:

facebook.authorize(this,
  new String[]{ "publish_checkins", "publish_stream"},
  new DialogListener() { /*crazy stuff here*/ }
);

My problem is the very first time logging in. Because it seems that the facebook is is not supporting logins from test accounts I can't talk about SSO but consider the "normal", web based, login screen popping up. 我的问题是第一次登录。因为facebook似乎不支持从测试帐户登录,所以我不能谈论SSO,而是考虑弹出基于Web的“正常”登录屏幕。

Is there a way get around this screen and let the application perform a login via username/email/password combination - provided the user is willing to handle this data to the applications. 有没有一种方法可以绕过此屏幕,并允许应用程序通过用户名/电子邮件/密码组合执行登录-前提是用户愿意将此数据处理给应用程序。
Eg something like facebook.authorize(this, permArray, userName, password, 例如,诸如facebook.authorize(this, permArray, userName, password,

I ask because I'm not sure if this is even possible at all, read: if fb API is providing hooks for this. 我问是因为我不确定这是否完全可能,请阅读:如果fb API为此提供了挂钩。 I can imagine it is kinda security concern and thereby switched off. 我可以想象这是一种安全问题,因此已关闭。
In this case it would be cool if someone could provide a link to some documentation listing all possible login methods (not "all" but the important ones for smartphones) - this would definitely be helpful in the next meeting. 在这种情况下,如果有人可以提供一些文档的链接,该文档列出了所有可能的登录方法(不是“全部”,而是智能手机的重要登录方法),那就太好了-这无疑对下一次会议很有帮助。

The main document one should work with, in my opinion, when implementing the Authentication part for FB, is their tutorial (for Android this one) - seems you're familiar with it. 在我看来,当为FB实现Authentication部分时,应该使用的主要文档是他们的教程 (对于Android, 这是一个教程 )-您似乎很熟悉。 There you can see how facebook expects you to get logged in. 在那里,您可以看到Facebook如何期望您登录。
And here (for Android here ) is the list of the methods they provide for these purposes. 这里 (Android设备在这里 )是它们为这些目的的方法列表。

To be shorter, NO, they don't have some simple function, which would allow you to do something you mentioned. 简而言之,不,它们没有一些简单的功能,可以让您做您提到的事情。 Looks like you must use browser/their official app to login, in order to save cookies there; 看来您必须使用浏览器/官方应用程序登录才能在其中保存Cookie; or you can use UIWebView to save them in your app. 或者您可以使用UIWebView将它们保存在您的应用中。

I worked with FaceBook API some time ago and I didn't like it a lot. 我前一段时间使用FaceBook API,但我不太喜欢它。 Perhaps this is because of the changes they've been doing lately in the API, but their documentation seems to be just immature; 也许是由于他们最近在API中所做的更改,但是他们的文档似乎还不成熟。 not speaking about their official example client (HackBook), which just doesn't work as expected (eg post video on the wall doesn't work). 没有谈论他们的官方示例客户端(HackBook),该客户端无法按预期工作(例如,在墙上张贴视频不起作用)。
Somehow even after reading carefully their documentation I had quite a lot of questions like what can be done with this API and what's forbidden at all. 即使以某种方式仔细阅读了他们的文档,我仍然有很多问题,例如可以使用此API做什么以及完全禁止什么。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM