Advertisement
shishir123

Android_facbeook_sdk

Mar 21st, 2018
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. Work with facebook sdk in android.....
  2. 1. Create a new project
  3. 2. add mavenCentral() in both buildScript repositories and all project repositories in build.gradle in project level
  4. 3. compile 'facebook sdk....' in Build.gradle in app level
  5.  
  6. 4. Create a project in developer at facebook.
  7. 5. Then go to setting and add platform with package name, activityname, key Hash
  8. 6. Single Sign on must be on
  9. 7. Project must be public otherwise other facebook user will get the problem
  10. 8. For making public now i will need a privacy policy url...(Make a privacy policy free with termsfeed.com)
  11.  
  12. 9. Now add in Manifest(Internet permission, Metadata with app id, FacebookActivity, ContentProvider,)
  13. 10. Now You are ready to use facebook login button in you project...
  14.  
  15. //For Login.....
  16. 1. Either you can use LoginManager or Login Button to login with facebook...
  17. 2. For Logout you can also use LoginManager or LoginButton...
  18. 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.
  19. for Logout: LoginManager.getInstance.Logout()
  20. for Login: LoginManager.getInstance.registerCallback....
  21.  
  22. .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement