且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android Firebase-将经过身份验证的用户添加到数据库

更新时间:2021-10-14 07:11:57

调用 PostAsync 时,客户端在调用它的位置下创建一个新的子节点.这类似于HTTP POST 动词以及大多数其他Firebase SDK中的 push()方法.

When you call PostAsync the client creates a new child node under the location that you call it on. This is similar to the HTTP POST verb, and the push() method in most other Firebase SDKs.

要将数据写入您确切指定的位置,请使用 PutAsync :

To write data to a location that you exactly specify, use PutAsync:

var item = firebase.Child("users").Child(uid).PutAsync<Account>(user);

请参阅《 Firebase自述文件》中的示例.Xamarin .

See the example from the Readme of Firebase.Xamarin.