Full url https://instagram.com/ +username+ /?__a=1&__d=dis
And request component response
try{
JSONObject o1 = new JSONObject(_response);
full_name = o1.getJSONObject("graphql").getJSONObject("user").getString("full_name");
username = o1.getJSONObject("graphql").getJSONObject("user").getString("username");
eurl = o1.getJSONObject("graphql").getJSONObject("user").getString("external_url");
Bio = o1.getJSONObject("graphql").getJSONObject("user").getString("biography");
sd_pic = o1.getJSONObject("graphql").getJSONObject("user").getString("profile_pic_url");
hd_pic = o1.getJSONObject("graphql").getJSONObject("user").getString("profile_pic_url_hd");
timeline_media = o1.getJSONObject("graphql").getJSONObject("user").getJSONObject("edge_owner_to_timeline_media").getString("count");
followers = o1.getJSONObject("graphql").getJSONObject("user").getJSONObject("edge_followed_by").getString("count");
following = o1.getJSONObject("graphql").getJSONObject("user").getJSONObject("edge_follow").getString("count");
verified = o1.getJSONObject("graphql").getJSONObject("user").getString("is_verified");
if (eurl.equals("")) {
url.setVisibility(View.GONE);
}
else {
url.setText(eurl);
}
if (verified.equals("false")) {
imageview1.setVisibility(View.GONE);
}
else {
imageview1.setImageResource(R.drawable.tick);
}
if (Bio.equals("")) {
bio.setVisibility(View.GONE);
}
else {
bio.setText(Bio);
}
Glide.with(getApplicationContext()).load(Uri.parse(sd_pic)).into(circleimageview1);
Id.setText(username);
name.setText(full_name);
posts.setText(timeline_media);
followingg.setText(following);
followrs.setText(followers);
}catch(Exception e){
}
0 Comments