1

I'm developing an app which has a Content Action and an !app Action.

I would like to get via javascript (i.e. Open Social API I suposse...) the current user (I got it!) and the current blog post (blogpost id) from both actions.

Is it possible?

Thank you!

Rafa Romero
  • 2,667
  • 5
  • 25
  • 51

1 Answers1

3

I found it!

You can do it adding an gadgets.util.registerOnLoadHandler() listener, and inside it you should call the osapi.jive.core.container.getLaunchContext(function (selection) {});

From selection object you can get the type and the id:

var type = selection.jive.content.type;  
var contentid = selection.jive.content.id  

You have a full example from Jive Developers Website

Rafa Romero
  • 2,667
  • 5
  • 25
  • 51