2 Replies Latest reply on Dec 20, 2013 8:50 AM by pablo.addante

    Jive 7 Creating Actions via Jive API

    jona@skechers.com

      Hi Guys,

       

      We recently upgraded to Jive 7, but I think I am having problems sending Action Items now. It worked fine on Jive 6.

       

      To replicate this issue, I just copied the example code from the API Jive API v3.3 → osapi.jive.corev3.actions class and replaced the "deliverTo" values to match my ID, so it will send it to my account.

       

      //Send actions to 2 users with action links var actionJSON = {    "openSocial" : {    "actionLinks" : [    { "caption" : "Yes", "httpVerb" : "POST", "target" : "http://home.example.com/yes" },    { "caption" : "No", "httpVerb" : "POST", "target" : "http://home.example.com/no" }    ],    "deliverTo" : [    "https://example.jiveon.com/api/core/v3/people/2345",    "https://example.jiveon.com/api/core/v3/people/3456",    ]},    "title" : "Can you donate food to the food drive?",    "content" : "Please help out!", }; var request = osapi.jive.corev3.activities.create(actionJSON); request.execute(function() {   alert("Actions sent!"); }); request

       

      It sends it as a notification to my inbox, but not as an action. Also the buttons / labels are the only thing that appears. The content is missing. I know the action links will not work since they are just placeholders / examples. 

       

      Screen Shot 2013-12-18 at 5.25.01 PM.png

       

      This notification works if I do not send any "actionLinks" in the JSON object. ( The content also shows up just fine). Is this because my "target" properties are not valid URL? I was able to copy this snippet and work just fine in Jive 6

       

      Any help will be appreciated

      Thanks!