how to integrate Facebook API in Android Applicati

2019-06-19 01:44发布

I am developing a mobile social TV application on Android.I want to integrate Facebook with my application so that I can:

  1. Share things on Facebook
  2. Send request to friends on Facebook to join the application

2条回答
在下西门庆
2楼-- · 2019-06-19 01:55

you need to install an extension, similar to the core Android SDK, but no, here is what you need to do:

1.) go to https://github.com/facebook/facebook-android-sdk

2.) download the facebook directory ONLY! The other directories are only examples.

3.) Put the files from the src (you can copy the drawables too, if you want to) in the package, you are currently working with

4.) You are good to go, you can use the facebook "SDK"

see also these examples https://github.com/facebook/facebook-android-sdk/tree/master/samples , it is working example provided by facebook

查看更多
姐就是有狂的资本
3楼-- · 2019-06-19 02:15

You may use this.

Facebook Android SDK

But carefull about handling activity result. If you test integration in simulator you haven't installed facebook app. and sdk will show you a dialog with webview. But on a real phone if facebook app. is installed, authorization will go via app.

查看更多
登录 后发表回答