Last active
November 20, 2017 13:27
-
-
Save ziginsider/0b60055652a7275f5ba879e58c0b1047 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
private void getData(JSONObject object) { | |
try { | |
URL profile_picture | |
= new URL("https://graph.facebook.com/" | |
+ object.getString("id") | |
+ "/picture?width=250&height=250"); | |
Picasso.with(this).load(profile_picture.toString()).into(imgAvatar); | |
txtEmail.setText(object.getString("email")); | |
txtLocation.setText(object.getJSONObject("location").getString("name")); | |
txtBirthday.setText(object.getString("birthday")); | |
txtFriends.setText("Friends: " + object.getJSONObject("friends") | |
.getJSONObject("summary") | |
.getString("total_count")); | |
} catch (MalformedURLException e) { | |
e.printStackTrace(); | |
} catch (JSONException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment