5 Replies Latest reply on Jul 11, 2013 4:22 PM by sonny.lau

    Purposeful Places - Embedded Experience links

      I'm currently working on adding the embedded experience links into some of our tiles and I was wondering how that would work. Just to make sure I'm understanding this correctly, in our tiles, we can make our links function as if they're Embedded Experiences so that when the user clicks on the link and the app is installed, it would display its Embedded View. Would you have any sample code of this Aron Racho? A sample of what an object in the data.contents array would like like would be enough.


      I recall our previous meeting mentioning that we may need to copy parts of the Jive App (Shuriken in our case) into NodeJS, was that related to this?

        • Re: Purposeful Places - Embedded Experience links

          Sonny,
          I'm not sure we have code--yet. However, the way this should work is that you have an action object. I'll work with Aron to get one in place. I believe the way it works is that the action takes a URL and if there is a context object, it will open that URL in an embedded experience view.

           

          jive-sdk/docs/tile-list.md at master · jivesoftware/jive-sdk · GitHub

            • Re: Re: Purposeful Places - Embedded Experience links

              Aron Racho or Mark Weitzel, is there an example for this now?

               

              If I create an Embedded Experience link via the app, I see something like this:

              <a __action_id="hedloc.shuriken.entity" __appuuid="96157613-4026-4cd4-9d2b-b9858e4e3af1" __context="{&quot;id&quot;:&quot;105&quot;,&quot;value&quot;:&quot;- Test123&quot;,&quot;type&quot;:&quot;ticket&quot;}" __icon="images/icon16.png" __view="embedded.entity.view" class="jive-link-app-icon jive_macro jive_macro_appEmbeddedView" data-jive-context="{&quot;content&quot;:{&quot;id&quot;:1140,&quot;parent&quot;:{&quot;id&quot;:1121,&quot;type&quot;:&quot;osapi.jive.core.Discussion&quot;},&quot;type&quot;:&quot;osapi.jive.core.Message&quot;}}" href="javascript:;" id="hHh6HgVMVp4R4i9F" style="background-image: url('images/icon16.png');">#105 - Test123<span class="j-ui-elem j-app-link"></span></a>
              

               

              From the documentation, it seems like the jive-sdk will allow something like this:

               

              data.action = {
                text: 'Open Test123 in Shuriken',
                context: {
                  id: 105,
                  value: 'Test123',
                  type: 'ticket'
                }
              };
              

               

              However this will not let me specify which app I want to target. Am I correct in assuming the data.action.context contents is supposed to be the same as the __context attribute in the HTML Link? How would I get this to work?

                • Re: Purposeful Places - Embedded Experience links

                  Sonny Lau,

                  The way that you specify the app is actually in the anchor tag through the __appuuid. In what you have below, the app is 961... Right now, with an embedded experience, you need to specify this via HTML.

                       <a __action_id="hedloc.shuriken.entity" __appuuid="96157613-4026-4cd4-9d2b-b9858e4e3af1"

                  To create this in the body, you essentially just properly escape the sequence of HTML that you get from doing a regular !App embedded experience.

                  (cc: Ric Goell: Here's the need for the API for creating an embedded experience.)

                    • Re: Purposeful Places - Embedded Experience links

                      Could you provide me with an example based on the link/code from my previous comment? I'm still a bit confused about what that should look like.

                       

                      Would this go into the data.action.text field? What encoding should I use to escape the HTML? Just backslashes? Escaping the HTML?

                       

                      Going on that, my query would look something like this:

                       

                      data.action = {  
                        text: '&lt;a __action_id="hedloc.shuriken.entity" __appuuid="96157613-4026-4cd4-9d2b-b9858e4e3af1" __context="{&amp;quot;id&amp;quot;:&amp;quot;105&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;- Test123&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;ticket&amp;quot;}" __icon="images/icon16.png" __view="embedded.entity.view" class="jive-link-app-icon jive_macro jive_macro_appEmbeddedView" data-jive-context="{&amp;quot;content&amp;quot;:{&amp;quot;id&amp;quot;:1140,&amp;quot;parent&amp;quot;:{&amp;quot;id&amp;quot;:1121,&amp;quot;type&amp;quot;:&amp;quot;osapi.jive.core.Discussion&amp;quot;},&amp;quot;type&amp;quot;:&amp;quot;osapi.jive.core.Message&amp;quot;}}" href="javascript:;" id="hHh6HgVMVp4R4i9F" style="background-image: url(\'images/icon16.png\');"&gt;Open Test123 in Shuriken&lt;span class="j-ui-elem j-app-link"&gt;&lt;/span&gt;&lt;/a&gt;',
                        context: {  
                          id: 105,
                          value: 'Test123',
                          type: 'ticket'
                        }  
                      };