Last active
November 20, 2017 13:05
-
-
Save ziginsider/c3b8b3410ec7b6fb17f842b5c6f10f19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| //printKeyHash(); | |
| callbackManager = CallbackManager.Factory.create(); | |
| txtBirthday = (TextView) findViewById(R.id.txt_birthday); | |
| txtEmail = (TextView) findViewById(R.id.txt_email); | |
| txtFriends = (TextView) findViewById(R.id.txt_friends); | |
| txtLocation = (TextView) findViewById(R.id.txt_locale); | |
| imgAvatar = (ImageView) findViewById(R.id.avatar); | |
| LoginButton loginButton = (LoginButton) findViewById(R.id.login_button); | |
| loginButton.setReadPermissions(Arrays.asList("public_profile", | |
| "email", | |
| "user_location", | |
| "user_birthday", | |
| "user_friends")); | |
| loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() { | |
| @Override | |
| public void onSuccess(LoginResult loginResult) { | |
| } | |
| @Override | |
| public void onCancel() { | |
| } | |
| @Override | |
| public void onError(FacebookException error) { | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment