Search code examples
jqueryxmppopenfirestrophe

Creating a xmpp pubsub node using strophejs


I am creating a pubsub related application in html where I have to create a pubsub node.I have seen in 'Professional XMPP Programming with JavaScript and jQuery' how to create anode.but In the book node is created without giving its name.I know we do both way around. but I am unable to create a node by specified name. actuall code of creating node in book which is running properly is:

var createiq = $iq({to: Together.service, type: "set"})
          .c('pubsub', {xmlns: Together.NS_PUBSUB})
          .c('create');

and I have modified it for creating node with a name:

 var createiq = $iq({to:Together.service,
                type:"set",
                })
                .c('pubsub', {xmlns: Together.NS_PUBSUB})
                .c('create',{node:'asdfghjkl'});

If any one has created a pubsub node using xmpp and strophe then plz help me out...


Solution

  • There already exist plugins for Strophe to do PubSub: