meteor

Meteor how to get access to Facebook Graph Api for both Server and Client side

守給你的承諾、 提交于 2019-12-21 20:09:06
问题 accounts-facebook package provides only logIn and logOut functionality. meteor-fbgraph gives access to fbgraph on server side. facebook-sdk gives access to fbgraph on client side. The problem is that facebook-sdk doesn't use anything provided with Accounts-ui, such as Accounts.onLogin event or Accounts.ui.config . After click on {{> loginButtons}} when user is logged in only Meteor.user() does log out, facebook-sdk still has it's AccessToken and remains logged in. In the result half of the

Why does meteor undo changes to collections nested in an observer method?

孤街浪徒 提交于 2019-12-21 19:58:05
问题 I am trying to implement something like this: /* We use the command pattern to encode actions in a 'command' object. This allows us to keep an audit trail and is required to support 'undo' in the client app. */ CommandQueue.insert(command); /* Queuing a command should trigger its execution. We use an observer for this. */ CommandQueue .find({...}) .observe({ added: function(command) { /* While executing the action encoded by 'command' we usually want to insert objects into other collections.

Meteor: detecting an event in a nested template

自作多情 提交于 2019-12-21 19:55:50
问题 Newbie meteor question... I've got code vaguely similar to this: <template name="fancy-button"> <p>This is a fancy button that I use in several places!</p> <input type="button" class="very-fancy" value="Click Me!" /> </template> <template name="homepage"> {{> fancy-button}} // here, I want the button to bring up my "stats" page (go, iron-router, go) </template> <template name="stats-page"> {{> fancy-button}} // here, I want the button to show an alert </template> Question: in "homepage" and

Meteor / JS Dates

时光怂恿深爱的人放手 提交于 2019-12-21 17:44:25
问题 So I am trying to make a timesheeting app in meteor, creating projects and adding time entries. Why? it was all I could think of as a test app. But, I'm more used to dealing with PHP, in PHP I would just store a date field with a time length. Right now, I'm wondering what's the best wat to deal with dates in Meteor. Do… I do the same thing where I store a parsed string of the date, or is it a date time object? How would you deal with dates? (I'm only 3 hours into Meteor) 回答1: Meteor also

Tell Iron Router not to intercept a link

大城市里の小女人 提交于 2019-12-21 17:43:33
问题 I'm moving quite a large application to Iron Router. On the client side, all unknown routes are redirected to /404 . In addition, some routes are managed from the server side - for example /static , that just displays a static page via middleware. The problem is that Iron Router now intercepts all link clicks - so when I click a link to /static , the action is prevented, browser does not display the server response for that address, and user is redirected to /404 instead. How do I prevent

Why is meteor adding ObjectId around the _id field since today?

前提是你 提交于 2019-12-21 17:39:45
问题 Maybe I'm completely wrong, but since projects that I start today, when I use meteor mongo to connect directly to the mongodb, and insert a record (with mycol.insert(..) the _id field is surrounded with ObjectId("12345555..."). When adding a record from code this is not the case. So, records added via Meteor Mongo are not recognised inside the app any longer. I have done this in the past so often... what's happening here? 回答1: That's the MONGO way and you see this because you are using the

Is there a nice way to wrap each Meteor.user in an object with prototype functions and such?

♀尐吖头ヾ 提交于 2019-12-21 17:34:42
问题 I'm trying to come up with a nice way to wrap each user I fetch from the Meteor Accounts Collection in a function, including a few prototype helper functions and counts from other collections, etc. The best way to describe this is in code. The User function I want to wrap each user in would look something like this: // - - - - - - // USER OBJECT // - - - - - - var currentUser = null; // holds the currentUser object when aplicable function User(fbId) { var self = this, u = (typeof id_or_obj ==

How to access global variables in Meteor template without using a helper?

纵然是瞬间 提交于 2019-12-21 12:35:30
问题 I have all my image files served from a different domain, and I put that host name as a variable into Meteor.settings. Then, how can I access this variable within a Meteor template? For example, in this template, what's the best practice to replace img.example.com with a variable defined in Meteor.settings or some other global variables? I don't think it's a good idea to pass it to every template by using helpers. <template name="products"> {{#each items}} <img src="http://img.example.com/{

How to design a meteor smart package to transparently separate an app into different instances?

泄露秘密 提交于 2019-12-21 12:33:21
问题 This is a question for those who are very familiar with Meteor's architecture. I am trying to design a smart package that can transparently run several "copies" of a Meteor app. That is, given an existing Meteor app, and several predefined groups of users, the package can semi-automagically "segregate" the app - run it in a way that for each group of users, it appears that only those users are using the app . I understand that this functionality could be custom designed for any application.

Meteor will not run without Sudo?

不羁的心 提交于 2019-12-21 12:29:30
问题 On OSX Yosemite and the latest version of meteor (1.0.1), no matter how many times I uninstall and reinstall it, I can't seem to get it running without sudo. My user account is an administrator account. But meteor refuses to run without sudo. The errors I'm getting are all: -bash: meteor: command not found I've seen a few posts on here with similar problems. I've tried repairing disk permissions with disk utility. I've tried: sudo chown -R $myUsername /usr/local/bin/meteor I'm not sure what