Linkedin-j - update.getUpdateContent().getPerson().getCurrentStatus() returns always NULL while using Linkedin-j

110 views Asked by At

i'm trying to get Linkedin Users Network Updates.

my code is-

//Network --->
            System.out.println("Linkedin Users Network ---> Details...");
            @SuppressWarnings("deprecation")
            Set<NetworkUpdateType> nUpdate = EnumSet.of(NetworkUpdateType.SHARED_ITEM, NetworkUpdateType.STATUS_UPDATE);
            int start =0;
            int count =20;
            Network network = client.getNetworkUpdates(nUpdate, start, count);
            System.out.println("Total updates fetched:" + network.getUpdates().getTotal());

            for (Update update : network.getUpdates().getUpdateList()) 
            {
                System.out.println("-------------------------------");
                System.out.println(update.getUpdateKey() + ":" + update.getUpdateContent().getPerson().getFirstName() + " " 
                                    + update.getUpdateContent().getPerson().getLastName() + "->" + update.getUpdateContent().getPerson().getCurrentStatus());
                if (update.getUpdateComments() != null) 
                    {
                        System.out.println("Total comments fetched:" + update.getUpdateComments().getTotal());
                        for (UpdateComment comment : update.getUpdateComments().getUpdateCommentList()) 
                        {
                                System.out.println(comment.getPerson().getFirstName() + " " + comment.getPerson().getLastName() + "->" + comment.getComment());                         
                        }
                    }
            }

but here-

update.getUpdateContent().getPerson().getCurrentStatus()

always returns NULL.

any suggestion- what i need to do.?

0

There are 0 answers