如何保持连接至Facebook的Andr​​oid应用程序 [英] How to stay connected to facebook in an Android application

查看:142
本文介绍了如何保持连接至Facebook的Andr​​oid应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作,我需要整合Facebook的社交功能的应用程序。

I am working on an application where I need to integrate the social functionality of Facebook.

在我的应用程序有一个按钮,用户连接到他的Facebook个人资料。 当用户preSS这个按钮,我只打开与Facebook网站一个web视图,与用户的Facebook页面。现在可以说,我知道他的电子邮件和密码,我想自动连接了他,他不必每一次进入他的电子邮件和密码。 我试图解决这个问题把我的下一个<一个href="http://stackoverflow.com/questions/11117516/move-to-the-facebook-application-page-after-authenticate-through-single-sign-on">question,但你可以不出来见。

In my application there is a button that connects the user to his Facebook profile. When the user press this button I'm only open a webview with the Facebook site, with the user Facebook page. Now lets say that I know his email and password and I want to connect him automatically, that he not have to enter his email and password every time. I tried to solve it throw my next question, but as you can see with no success.

我试图也坚持饼干CookieSyncManager,CookieManager和手动操作。

I tried also persisting cookies with CookieSyncManager, CookieManager and manually handling.

我想我可以改变我发送到web视图的URL解决这个问题,但我不知道是哪个网址。 (试过 http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php http://www.facebook.com/plugins/login .PHP ,然后串联用户Facebook页面的URL,例如 http://www.facebook.com/UserProfile

I think I can solve it by changing the url that I sends to the webView, but I don't know which url. (tried http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php and http://www.facebook.com/plugins/login.php and then concatenate the url of the user Facebook page, for example http://www.facebook.com/UserProfile)

我真的AP preciate任何帮助!

I really appreciate any help!

感谢。

推荐答案

还有一种方法,使用SSO的SDK验证,而不是这里讨论的:<一href="http://stackoverflow.com/questions/4521013/how-to-disable-facebook-single-sign-on-for-android-facebook-android-sdk">How禁用Facebook的单点登录Android的 - Facebook的 - Android的SDK
。 但我认为,它只是导致糟糕的用户体验,因为用户需要输入自己的电子邮件/密码,这是不是一个有趣的任务来完成大多数的移动设备。

There's a way to use the SDK authentication instead of the SSO as discussed here: How to disable Facebook single sign on for android - Facebook-android-sdk.
But I think that it just results in a bad user experience since the user will need to enter his email/password which is not a fun task to do with most mobile devices.

如果用户拥有Facebook应用程序(武士刀)安装(即使用单点登录的),那么你应该能够只是打开它通过使用意向的用户配置文件。
我从来没有这么做过,但是这两个线程:
从其他应用程序推出的Facebook应用程序

从Android应用程序中打开一个Facebook页面
它看起来像你可以这样做:

If the user has the facebook application (katana) installed (which means the use of SSO), then you should be able to just open it with the user profile by using an intent.
I've never done it before, but from these two threads:
launch facebook app from other app
and
Open a facebook page from android app
it looks like you can do something like:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setClassName("com.facebook.katana", "com.facebook.katana.ProfileTabHostActivity");
this.startActivity(intent);

这篇关于如何保持连接至Facebook的Andr​​oid应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆