Hey guys. Maybe this question has come up a few times, but i can’t seem to find the right answer.
I’m developing a Social platform, where i want to save the users name in my collection. By that means, i want the logged in users username from Accounts-ui with either Facebook, Twitter etc. and save that name in my collection with Collection2.
So when i print out the author, instead of the users ID, it will instead show the users name. For example: “Nick Johnson” instead of “Hwus282HSsw82asd12”
Hey man! Thanks for the answer.
With this example, the user has to type a name in a field. That’s not entirely what I’m looking for, but really a great and related post otherwise.
I want to automatic get the users logged in username and save it in my collection, without the user has to type their name.
For example, the only data I want from the user is description. Both username and createdAt should automatically be put in the database. But I can’t seem to get the actual name, only id
Now I have the following: return this.userId, which returns the logged in users Id. But if I change it to: return Meteor.user it won’t submit and nothing happens. Can you tell me why?
Meteor.user returns an object with the user properties. There you can get the information you need depending on how you stored it, for example Meteor.user.profile.fullname
You have to register your app with the provider (in this case: Facebook), then you get the secret for ServiceConfiguration.configurations and then you can try again.
I can’t seem to solve this problem. On my website, the first thing the user enters is a “hello page”. Here the user signs in and gets redirected to /frontpage.
I’ve added the code you send on Frontpage.js, which should be checked after the user has signed in. But still it gives me the error. Do you have any idea if it’s misplaced or something? I could upload my project if that helps
Without some kind of code accompanied by that message, I can’t tell you anything but that you’re trying to update several documents at once on the client. Only the server is allowed to do bulk updates.