0
votes

Hi we want to add tags to a userprofile programmatically. We are using the Social Business Toolkit for this purpose. More specifically we use the ProfileService, first we need to get the current tags and this always gives 0 results.

String userEmail = "[email protected]";

            Map<String, String> params = new HashMap<String, String>();
            EntityList<Tag> tags = app.profileService.getTags(userEmail, params);

or

EntityList<Tag> tags = app.profileService.getTags("427ffbb1-ab50-4e82-97b2-46bf5584e799");

both give no tags (tags.size == 0) when we try to print them

if (tags.size() <= 0) {
                System.out.println("No tags to be displayed");
            }
            for (Tag tag : tags) {
                System.out.println("Tag : " + tag.getTerm());
                System.out.println("Tag Frequency:  " + tag.getFrequency());
                System.out.println("Tag Visibility : "
                        + tag.isVisible());
                System.out.println("");
            }

I have tried to test this with Connections Cloud and Greenhouse , but for those platforms I get authorization errors.
I tried this both with a 4.5 and 5.0 Connections environment, both giving the same result. However when I use the URL

profiles/atom/profileTags.do?targetEmail=ABC%40YYZ.com  

I do get (XML) results.

We are using version 1.1.9.

1

1 Answers