Search code examples
ibm-connectionsibm-sbt

Post an activity entry to all and to me


I try to post an activity entry with the ActivityService class. I want that all my followers and myself can see it.

this.

ActivityStreamService service = new ActivityStreamService();
service.postEntry("@me", "@all", "", jsonObject, header);

I saw my entry but not my follower

With this.

ActivityStreamService service = new ActivityStreamService();
service.postEntry("@public", "@all", "", jsonObject, header);

My follower saw the entry, but I do not see this.

Have anybody an idea which one is the correct combination?


Solution

  • There are a couple of ways... 1 - You can use the Distribution method http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Distributing_events_ic45&content=pdcontent openSocial : { "deliverTo":[ {"objectType":"person", "id":"tag:example.org,2011:jane"} ] }

    *You will need a special j2ee role in order to distribute this content (trustedApplication Role in WidgetContainer Application)

    2 - You can use the ublog http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Posting_microblog_entries_ic45&content=pdcontent

    POST to my board: /ublog/@me/@all { "content": "A new test post" }

    3 - Otherwise, you need to do multiple posts

    This means than the event would have to be sent separately to each user that is to receive the event. In order to ensure that this can be done more efficiently, an extension to the the Open Social spec allows for a few means of distribution in the data model

    I hope this helps.