Thursday, 8 June 2017

I am having issues instantiating a new client, how can I instantiate a new client?

My compiler returns errors saying I should pass in a key when I instantiate a new client, it says I should pass in a key when I instantiate a client.

I also get an error saying $token is not defined.

Please review the below code

var stream = require('getstream');
// Instantiate a new client (server side)
client = stream.connect('q3nwu4pbz222', '3pvgczzbjmkpvhdp2kd28brxva5gvvdgb4wsspunanqgwk6tzj2pbestuevgrs22', '25553');
// Instantiate a new client (client side)
client = stream.connect('q3nwu4pbz222', null, '25553'); 
// Find your API keys here https://getstream.io/dashboard/

// Instantiate a feed using feed class 'user' and user id '1'
var user1 = client.feed('user', '1', token); 

// Instantiate a feed for feed group 'user', user id '1' and a security token generated server side
user1 = client.feed('user', '1', $token);



via Davidson Otobo

No comments:

Post a Comment