I am trying to login with facebook using android sdk 4.7. I have tried the following link http://www.theappguruz.com/blog/android-facebook-integration-tutorial http://www.androidhive.info/2012/03/android-facebook-connect-tutorial/
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I have used facebook sdk 4.10.0 to integrate login in my android app. Tutorial I followed is :
Facebook login integration android studio.
You will be able to get first name, last name, email, gender , facebook id and birth date from facebbok.
Above tutorial also explains how to create app in facebook developer console through video.
Gradle.build
Source code for activity_main.xml
Code for MainActivity.java
First Go to https://developers.facebook.com/ ,Login and select My Apps and create a App.
Follow the given instruction on by one properly.
Give packagename and packagename.ActivityName, select use App name then save it.
Generate Hash Key (Download OpenSSL) and (Java JDK). - For windows!
Extract the OpenSSL stuffs to C:\OpenSSL
Go to CMD prompt set the current path to JDK's bin folder.
Then use this command :
Make sure you are using proper Paths like UserAccountName etc.Mine was shredder.After that use Password : 123456.
Paste the hashKey to the required field. Then follow along....
Use the following code if required.
}
This code works for me, try it out and check that you are using facebook sdk 4.7
the xml design is as follow
the mainefest file is as follow:
Check this simple facebook login Library:
https://github.com/sromku/android-simple-facebook
Here is the link to my uploaded demo for simple facebook login with custom button: http://www.demoadda.com/demo/android/login-with-facebook_108
Its the simplest way to implement the facebook login in android application.
You can add the button like this :
And in gradle File you can add:
Please check.
You can use the Facebook Android SDK. Here you have explained in the documentation how to build a Facebook Login to your app.
It says: