DispatchMe / meteor-twilio

A meteor package for using Twilio's APIs.
24 stars 5 forks source link

Twilio is not defined #10

Open johhansantana opened 8 years ago

johhansantana commented 8 years ago

I've added this code into my controller:

// Configure the Twilio client
var client = new Twilio({
  from: Meteor.settings.TWILIO.FROM,
  sid: Meteor.settings.TWILIO.SID,
  token: Meteor.settings.TWILIO.TOKEN
});

// Send a message
client.sendSMS({
  to: '+17877877878',
  body: 'Hello world!'
});

But I get the Twillio is not defined error.

What am I doing wrong?

Cu4rach4 commented 8 years ago

You are woking on client side, create a folder on server side and then call a method...

NicholasEli commented 7 years ago

I get these errors when running it from the server with the same setup above;

W20170306-13:06:03.804(-8)? (STDERR) /Users/nicholas/.meteor/packages/meteor-tool/.1.4.3_1.8i8my6++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:313 W20170306-13:06:03.805(-8)? (STDERR) throw(ex); W20170306-13:06:03.805(-8)? (STDERR) ^ W20170306-13:06:03.805(-8)? (STDERR) [object Object] => Exited with code: 1 => Your application is crashing. Waiting for file change.