How to get profile picture in android using Twitter kit,

前端 未结 4 2072
栀梦
栀梦 2021-02-15 18:12

I\'m trying to implement a simple application that uses Twitter kit. The problem is that i\'m not able to get the profile picture.Any help would be appreciated.

Thanks<

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-15 18:19

    from gradle 2.0.0 and up use following method:

        Call userResult=Twitter.getApiClient(session).getAccountService().verifyCredentials(true,false);
                        userResult.enqueue(new Callback() {
                            @Override
                            public void success(Result result) {
                                User user = userResult.data;
                                String profileImage= user.profileImageUrl;
                            }
    
                            @Override
                            public void failure(TwitterException exception) {
    
                            }
                        });
    

提交回复
热议问题