2017-09-21 15 views
0

私はFacebookの機能でログインしてAndroid用のチャットアプリケーションを作っています。私は、IMプロトコルにXMPPを使用することに決めました。私はすでにFacebook Login APIでサインアップを実装していましたが、今はXMPPサーバーにログインする方法を統合する方法が不思議です。私はMySQLデータベースとSmack API for Javaを使ってOpenFireサーバを使用しています。サーバーに接続する際にユーザー名とパスワードを入力する必要がありますが、Facebook Login APIから取得できる唯一の情報はパブリックプロファイルとFacebookユーザーIDです。FacebookログインAPIを使用してXMPPユーザーを認証するにはどうすればよいですか?

OpenFireでFacebook認証APIを使用してユーザーを認証するにはどうすればよいですか?

答えて

0
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 Services

+1

FacebookのチャットAPIが廃止されており、また、私はFacebookのインスタントメッセンジャーに接続したくない、私は自分の使者を作るが、自分のFacebookアカウントとそのユーザーを認証します。 – Mesayah

関連する問題