Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Work with facebook sdk in android.....
- 1. Create a new project
- 2. add mavenCentral() in both buildScript repositories and all project repositories in build.gradle in project level
- 3. compile 'facebook sdk....' in Build.gradle in app level
- 4. Create a project in developer at facebook.
- 5. Then go to setting and add platform with package name, activityname, key Hash
- 6. Single Sign on must be on
- 7. Project must be public otherwise other facebook user will get the problem
- 8. For making public now i will need a privacy policy url...(Make a privacy policy free with termsfeed.com)
- 9. Now add in Manifest(Internet permission, Metadata with app id, FacebookActivity, ContentProvider,)
- 10. Now You are ready to use facebook login button in you project...
- //For Login.....
- 1. Either you can use LoginManager or Login Button to login with facebook...
- 2. For Logout you can also use LoginManager or LoginButton...
- 3. In case of using LoginManager there is no need to use Login Button. you can use normal button. Then you can set onClick Listener with LoginManager.
- for Logout: LoginManager.getInstance.Logout()
- for Login: LoginManager.getInstance.registerCallback....
- .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement