Activate such two-factor authentication
1) First log in to Facebook account.
2) Click on the top and visible triangle on the right side and go to the settings.
3) After going to the settings, you will see the option of security and login on the left side.
4) After clicking on security and login, you will get change password and log-in options at the bottom. Just below these options ‘two-factor authentication’.

5) Click on two-factor authentication.

6) After this, click on Get Started.

7) Now you will have two options- text messages and authentication app.
First method text message
1) If you choose the text message option then you have to enter the phone number. Keep in mind that the code will be sent to your number for verification.

2) After entering the number, a code will be received on your phone.
3) Two-factor authentication will be activated as soon as the code is entered.
Second method Authentication App
1) If you do not want to enter your mobile number, then you can choose this option. For this, you have to download the Google Authenticator app visible on the screen.
2) After downloading the app, scan the QR code appearing on the screen with the help of the authentication app.
3) After this, enter the code seen in the app on the computer.
4) After entering the code, you will see that two-factor authentication will be turned on.