AdamNYC
AdamNYC

Reputation: 20415

Meteor client subscribe to a third-party API

There are a few examples of using Meteor with, say, Twitter API. Typical approach is to insert new tweets into Meteor Collection in the server, then let clients subscribe to this collection.

However, writing to database is costly, time consuming and unnecessary if I just want to display the new tweets on client there's no need to store these tweets in my database.

Is it possible for Meteor client to listen to Twitter directly, or at least avoiding writing new tweets to Meteor server database?

Upvotes: 1

Views: 587

Answers (1)

Rahul
Rahul

Reputation: 12231

Just talk to the Twitter REST API directly with Meteor.http.get or some other approach like jQuery's $.getJSON. You don't really need to build anything specifically with Meteor to talk with the Twitter API, but your app will obviously benefit from Meteor features like live templating if you do. Otherwise you'll have to patch things together yourself.

Upvotes: 1

Related Questions