How to display the Contacts name using Digits-FindFriends?

265 Views Asked by At

I am using Digits by Twitter for mobile number authentication by sending OTPs. I need to display a list of user's contacts who have registered for my app like they do in WhatsApp by their contact names. Till now after following the docs of Digits and making use of Find your friends, I am able to show the list of matched contacts. But the list shows user-id, how can I make it to show contact names?. I tried the below code

Digits.findFriends(new ContactsCallback<Contacts>() {

        @Override
        public void success(Result<Contacts> result) {
            if (result.data.users != null) {
                // Process data
                Toast.makeText(getActivity(), "Authentication users"
                        + result.data.users.id, Toast.LENGTH_LONG).show();
            }
        }

        @Override
        public void failure(TwitterException exception) {
            // Show error
            Toast.makeText(getActivity(), "Authentication users"
                    + exception, Toast.LENGTH_LONG).show();
        }
    });
0

There are 0 best solutions below