The community forums are in BETA and closed to the public.

generate_channel_list is not a function

Hello. I'm kinda new in PubNub.

Well, I'm using channel groups but I have a problem when I try to subscribe to a channel group.

This is my code:

pubnub = PUBNUB.init({
    publish_key: data.publish_key,
    subscribe_key: data.subscribe_key,
    auth_key: data.auth_key,
    ssl: true
});
pubnub.channel_group_add_channel({//----- Adding channel to my group
    callback: function(){
              pubnub.subscribe({
                    callback:function(m){
                   console.log(m);
                },
                channel_group: "myChannelGroup"
               });
            },
    channel: "chan1,chan2",
    channel_group: "myChannelGroup"
});

So the error raises when I try to subscribe to "myChannelGroup". The javascript console says: "generatechannellist is not a function" and the error comes from pubnub library.


Comments to this discussion are now closed!