Unable to get profile pic using twitter android kit

24 Views Asked by At

Iam trying to get twitter profile pic by using Twitter android kit.I place this below code inside a button event but iam unable to retrive it success or failure anyone should excecuted but both qare not excecuting i debugged using break point and single step excecution the code does not excecute after the first line following the if statement.

final TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();

    if(session!=null)
    {
        TwitterCore.getInstance().getApiClient().getAccountService().verifyCredentials(true, true, false).enqueue(new Callback<User>() {
            @Override
            public void success(Result<User> result) {
                  String imgurl = result.data.profileImageUrl;
            }

            @Override
            public void failure(TwitterException exception) {
                Toast.makeText(getActivity(),exception.toString(),Toast.LENGTH_LONG).show();

            }
        });
0

There are 0 best solutions below