Where can I find my Firebase reference URL in Fire

2019-04-05 11:04发布

In the third last line of the below code, how can I find the firebase URL. I am not able to find it. Can anyone provide me the best link on how to setup firebase facebook login with android.

public void saveUser() {
    //Add YOUR Firebase Reference URL instead of the following URL
    Firebase myFirebaseRef = new Firebase("https://androidbashfirebase.firebaseio.com/"); //<---- How to find this
    myFirebaseRef = myFirebaseRef.child("users").child(getId());
    myFirebaseRef.setValue(this);
}

6条回答
Root(大扎)
2楼-- · 2019-04-05 11:27

When you create you Firebase database, it will be created with a unique URL ending in firebaseio.com. The URL of the database follows the format:

https://<PROJECT_ID>.firebaseio.com/

What you want to do is go to the Database tab, switch from Cloud Firestore (Beta) to Realtime Database using the select button. You will be able to see your DB URL as shown in the following:

enter image description here

I hope this helps!

查看更多
叛逆
3楼-- · 2019-04-05 11:29

Update: UI of firebase has been changed so follow below steps

enter image description here


enter image description here


enter image description here

查看更多
唯我独甜
4楼-- · 2019-04-05 11:37

NOTE: Same for both old and new UI of the firebase.

  1. Go to Authentication Tab and click on WEB SETUP button on the right upper side of the screen. enter image description here

  2. Now you will see a dialog box opened, you can see a lot of information fields in it and you will also be able to see a field databaseUrl, this is your required field. enter image description here

查看更多
家丑人穷心不美
5楼-- · 2019-04-05 11:39

As Neeraj Chand said: Now there are two kinds of databases on firebase - firestore and Realtime Database. If you are on firestore mode (default) then u might not find the url to db directly. Switch to Realtime Database from the blue dropdown on the top and you will get the url watch this image

查看更多
戒情不戒烟
6楼-- · 2019-04-05 11:47

If you haven't created Firebase account already, Just Create it first. Head over to console and add a new App over there if not added. If you already got an app just click on it and go to dashboard.

In Dashboard click on Database and you will see the Firebase Reference URL over there. Refer to below Screenshot

Firebase Reference URL

I hope it helps you.

查看更多
乱世女痞
7楼-- · 2019-04-05 11:49

You should have done searching by yourself first. Here you are,

  1. Open Firebase Console

enter image description here

  1. Select your app, and go to database, marked is the url you need.

enter image description here

查看更多
登录 后发表回答