簡體   English   中英

如何使用Facebook登錄API對XMPP用戶進行身份驗證?

[英]How can I authenticate XMPP users with Facebook Login API?

我正在使用登錄Facebook功能為Android開發聊天應用程序。 我決定將XMPP用於IM協議。 我已經設法實現使用Facebook Login API進行注冊,但是現在我想知道如何集成它以登錄到XMPP服務器。 我將OpenFire服務器與MySQL數據庫和Smack API for Java一起使用。 連接到服務器時,我需要提供用戶名和密碼,但是我從Facebook登錄API獲得的唯一信息是公共配置文件和Facebook用戶ID。

如何讓OpenFire使用Facebook登錄API來驗證用戶身份?

Facebook has implemented XMPP Server for us, so we just need to make the implementation for client.
After googled, i’ve found one Java XMPP Client API called SMACK that I think is suitable for this case. So, I’m going to use this API.
First, you have to download the API from here (last stable version was 3.2.1 when I wrote this note).
After downloaded the API (whether in zip or tar.gz), extract that compressed file to your local directory in your machine.
The file has already came with several documentation, examples, and Doc API. So, it will be easy for us to learn.
For basic use, there are 3 required jar files for this API as follows:

smack.jar
smackx.jar
smackx-debug.jar (used for debug mode, i.e. if you turn on the debug mode).
This link may help you out. please try this.

Facebook Chat Xmpp服務

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM