So I know that it is recommended to create the methods in a place that is accessible to both the client and the server (like a lib folder).
However, I have a method that starts by getting the user’s facebook id:
const facebookUserId = Meteor.user().services.facebook.id
and then updates the user’s profile,
on the client I get an immediate error
exception while simulating the effect of invoking 'getUserFacebookImg' TypeError: Cannot read property 'facebook' of undefined
I assume that its because “services” isn’t available to the client. (on the server I do get the result)
(or is there a deifferent reason for this error?)
So my question is: should I leave this method as is in a folder that’s available to both the client and server, or should I create a separate doc for it? if so, and suggestions on how to separate the both from the server only methods?