{"componentChunkName":"component---src-pages-markdown-remark-fields-slug-js","path":"/engineering/login-with-facebook/","result":{"data":{"markdownRemark":{"id":"d2908f6b-cd0a-5350-8ca0-0874d84b885b","excerpt":"There are more than 1 million websites or apps are using \"SignIn with Facebook\" or \"Login with Facebook\". Do you know why they are using Facebook login and how…","html":"<p>There are more than 1 million websites or apps are using <strong>\"SignIn with Facebook\"</strong> or <strong>\"Login with Facebook\"</strong>. Do you know why they are using Facebook login and how it is beneficial in conversion?</p>\n<p>According to multiple surveys, there are more than 3 billion users worldwide are using social media and it is around 50% of the world's population. </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 441px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 73.24263038548753%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAABJ0AAASdAHeZh94AAAD7ElEQVQ4yyWU609TZxzHz0uzReQul0JcXcsoQq1QbqW0lPac01Naej+tpzcUKreBgC04ERRwEzVoXNQtu2TGLUvmm8VsS5Yly/wLtuzP8c1nD+wkvzzPeV58vt/fN8/vkYzLOslUnLyhkxP7bFZnLq9TzMQJBGWUkIwaVghOq8hTMpPqBP6Ql8CUDy0aIJFRSRsa04lJvPI4kpEvUMgbzBYNSqUCoy4nqwmFHx/sUr5qEIoHmUqqhBIyWlyAY37CSZ8AeQXITzqnEdVDaAlVnIeQcgJmpCP4fWP0Oe30WjvYy0V4tbvB47Uy2VSQRFolllEEPCBKJpqWien+E6FgLEgg4heCGhOaD+lyMcxh5RqL4uD9mlN0Np8h5x04qcNrBp/dmBdxqGRExTMyek5BF870XICIcDqVCBIRolpMRBPxIj07WOOP5w+ZE7lYhLuRC2bKyii7RoSD2Qzf7q6TM9xEE05S6SGCoT4GXR8y7LaIjHuIxAe5nPOQyg6T1AeR3nx+yFeVRXR1EP+oDcXRRXSwm5L3klhtlEMThFUH7skuhsesWC6YMHe3c87aisXWhs1uore/E5fHysi4Fen7/U0elg1iwX6ioX4CdjMeaxtanxmXpY3MxBCRwDBmWwsd55sxd7XR2tF4Uk1t9Sd11tTIBx+1cV4ISS+3r1NUXHR01GHpaUf1OJjsMjFiPovSe46y5mazmKS6kCMkj9Hdc46a+veoaz5Ni4A2nK2lWUCP902t9Uj3SnGuxAI4+qy4hy8xb8Tx9Z7Hbqqjt72WxJCNuLObR+vz/PnyBV/u32SlkMY1ZKehqYaW9noammupbThNo4BLldgkR6tXuS3aXk5pxMcHCAzYGDC34OhsJOywkJ1wMtpn4aiyxM9P7vHbi0f88uwBlRkdU2cTTS11/wOPHV4Pe/imusiWESU7OYIRcKGN2HFa2vGKLN2WVpLaBFnR7l0h+sWtVY7WyzytLvDd3SozuoLX14OsXERWLyLdTCkcFGNsJgLkZRcL4l7l1HG2K9e5f+cWG0tlDg/u8HB/h+dH93n64B6HO1vcKCTYWyzy9d4GdytJttYjVNciSHP+QVQRvks4ygvQanZaAN38/usbjr/Xr3/i33/+5tUPr3j37h1/vX3L/s4nrOfjzEVlnlSXeLQ1w+66zu5aFsluasDSXEPrmVN4+nuYEWO0pE+x+fE1Pr2zTSk9zf7tLVbmr3AoXFZX5tkoF9hbLjErHodtEcP+yjEwzc5aCmnK14tTXBNLSy1mEaqvv5vw2CUiLgcrYqRKmgdHVwcrIuNl8QgUxX9ZjFlBrMGhC8zGFJZzouWFGLfWpvkPdD9BmOWpBOcAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"login-with-facebook\"\n        title=\"login-with-facebook\"\n        src=\"/static/a7663b66ba06daf295eda5e5e2ce441f/efc6e/facebook-login-wow.png\"\n        srcset=\"/static/a7663b66ba06daf295eda5e5e2ce441f/efc6e/facebook-login-wow.png 441w\"\n        sizes=\"(max-width: 441px) 100vw, 441px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>The biggest challenge and most important things are to make user registration and login quick and easy while developing our application. The registration forms required a lot of data that need to be filled by users manually and it causes lost, potential users. Additionally, users need to enter their usernames/emails and passwords in the login forms to authenticate themselves and also need to remember more individual IDs and passwords. </p>\n<p>Social Login allows customers to bring their existing social identities and use them to register and log in without creating a new profile explicitly. </p>\n<p>Facebook is the most favorite social media provider in comparison to other social media providers and the number of active Facebook users growing day by day.</p>\n<p>In this article, I will explain how you can implement <strong>“Log in with Facebook”</strong>  on your website or mobile app in a very easy manner. </p>\n<p>Facebook work on the OAuth 2.0 protocol and most of the social providers like Facebook, Google, Microsoft, Linkedin are supporting OAuth 2.0. Refer to this article <a href=\"/oauth2/\">Getting Started with OAuth 2.0</a> to know about OAuth flow. </p>\n<h3 id=\"create-your-facebook-login-app\" style=\"position:relative;\"><a href=\"#create-your-facebook-login-app\" aria-label=\"create your facebook login app permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Create Your Facebook Login App</h3>\n<p>Here you can find the complete step by step guide to create your Facebook Login App.</p>\n<h4 id=\"step-1\" style=\"position:relative;\"><a href=\"#step-1\" aria-label=\"step 1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 1</h4>\n<p>Go to <a href=\"https://developers.facebook.com\">Facebook Developer</a> and log in using your Facebook credentials.</p>\n<p><strong>NOTE</strong>: Please do not log in using a business account as Facebook will not allow you to create an app if you do so.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB80lEQVQoz12SS08TURiGB7CJ9qYIpaWdXoeZtvQCQyltR7EX2kJES1poEcrFnfGy6MrEBQtjYmIIO+NGdyZqoq6MMe7c6cIfwH/wRzyemSoLFm/Ol5x8z3nf7zvSuNpgOr3OhNbkqtrEGali8y8jeQykKQN7uMblsEEgGBWKEIooqPFZoopGbCZuSdcUskJyWEGyhytclG+IxiouARv1LHHr4Ih3X0959vIbbqWOO2Qgh4ZAUx6vnylfwJJZe6dl/P/uJEeozLi6SqYxYDK1yai/Sv/BU379POXtBxPYwCkXycwtUG+uUas3yRdKzOmLZOdz5PJF0hndgpmPSg7h0BWr49FW0PsfUdZeYPPlsQXKjEzmsUdqAlhgqXiNnf4+7c0u2zt9ur07dETd3zug0+meJZDMmTmjK0iuJPHWKxY7x2SKLTSjTzjXwyGAjkCBQuk69x8+Yndvn9utNp2tHlvdbVobbQE9REvM4pfDQ6A9VGHw/BPff//hyfFn5NQqN3cf8/r9D8Z8Bm6xlFRmnmqtwXK5iqImrLlNB0KWTNBZZBNoxj4cnHDy5gsbd4+QJvJ4kuvojXtcClYsoKIlSWd1ZrSE2GbMaj6v4VIEzISOeApIVxYY85Zwx2rCdZkLvpIV2QRGYqrlLCi+xv/m8zDz/AvxdgD9qFyQaQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/24db342a3c6a9447251fd1606d058c55/e5715/loginadius-facebook-img1.png\"\n        srcset=\"/static/24db342a3c6a9447251fd1606d058c55/a6d36/loginadius-facebook-img1.png 650w,\n/static/24db342a3c6a9447251fd1606d058c55/e5715/loginadius-facebook-img1.png 768w,\n/static/24db342a3c6a9447251fd1606d058c55/6aacb/loginadius-facebook-img1.png 1347w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"step-2\" style=\"position:relative;\"><a href=\"#step-2\" aria-label=\"step 2 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 2</h4>\n<p>Select the <strong>My Apps</strong> as displayed on the below screen.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 53.84615384615385%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAADI0lEQVQozy2S3U+aBxSH2c3ulixpYtzWmhVS69CiRYpbq9OCH7EFUaiKgPLqtAURq2IL+AH1qzAL1VAR3KhlKkZt17RYu1aNXZYtWZt9dNmyZN3FdrGbZX/EszfLrs7V+f2ek/NIZAX5aGu0VNdoMDTqMBobuGBqwGZtxd5uRrBbEAQbNouJLqGVLnsrzSYDrfp6GsQduaKUyg/ew3xeRUdzNZJ38nIoOymjUiVFX1mI9fwpeq11DDtaCPRbmHE3EbCXE+yp4+MpPzeuB1iY9pGZ6OWj+nJycg/zZs5bHJbKOK4oQaJSK+iy6HB26PA5jQRdTUy4Grjpbyd1TWArZCfVV8ZtTw0PM0s8yd5lbXqQkE1D2mvDY65DV6Yg2KIh94gUiUZ7hjFPNzMjvcTCXtYWAqTDLlbDTnbiQ3y7MsLBgpOniWGeP93klxfPeLQ4zWxbOfsxL9+thtgLXSLZc45Dh3KQnP5QzdT4INHpYVJRL/eWrvFoeZKv7if4fm+Lg+wW23fX+ePXl/z120/8/ecrXj0/YMNtZDco8E3Sy5fxYTbGrMiP5oknn1biG+hkatjO0pSTrdgVsiJZ1NdJs9lGRa0BWX4hE75Bvv48wY9iye8v9tiJXCWoU7PtbyIbNLMz2UZjRTESaUEeDvEJIxd1RAYMfBa6yP7yCHZjNa+9/ga5uW/jMJs4p60i1FvPerCFlVETD1JhMqMu7lzSkHTWsumuQqd8F4ms8Ch9gp5gn5HFQAebMQ9fLF3l9qSThMPA4/Ag//xwwJ3ZAKnrV0hHPKzcGGBn+z7jY37UqhM06qppOatELj0iBhbJ6O/UM+7UEx9rZz3czW7KSzY5zrKvh8RQJ3OjQ/y8vcLup1Hmw6Iy6RixxCLlmiqKSk6g19f+52lJqaiNVHEM9/+BC/42MjMCj+Nu7s1eJiqqlPK6uNVnZ381zuYnN4lM9LORSTIXj1NQrBDFLkKpViJYm1CJU1L8fikOSy0+Qcstv5n12R4O1sLsp+e4bKxhptuG4cwpSuXH2RHJXj7Lsrf7hMj8PMVlZeQdy0deouCstkIkPMm/C1b1npiNuEcAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/20b2c36d3b3e0924d6a391fb48b91c35/e5715/loginadius-facebook-img2.png\"\n        srcset=\"/static/20b2c36d3b3e0924d6a391fb48b91c35/a6d36/loginadius-facebook-img2.png 650w,\n/static/20b2c36d3b3e0924d6a391fb48b91c35/e5715/loginadius-facebook-img2.png 768w,\n/static/20b2c36d3b3e0924d6a391fb48b91c35/b4904/loginadius-facebook-img2.png 1768w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"step-3\" style=\"position:relative;\"><a href=\"#step-3\" aria-label=\"step 3 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 3</h4>\n<p>Click on <strong>Add a New App</strong> as displayed in the below screen.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 27.23076923076923%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAAAsTAAALEwEAmpwYAAABFUlEQVQY0zWQYU/CMBRF9///jgEl4DIQ1GCiiVEjbEI23NaNtVvbFR3Crq81fji5t016XltvMr3D9eweY8orf4GLUYDBeEZMMZjc0N4cQ1pfUh8S4+AWI9pbPr0g/IjxHm4RbpLepj9fnjypDCxKtZDlFoowPEFbxS5ZUUG3B3x3Rxx/TuBCoqxqKG0cdaNR7AX2vOklObycDuQFR57nKHZrpIzT1A2yQoAlK/jBgg5waN3ifD7j+S3Cw+MrjDHous4NI0fPSu7Ss4XRBMYYys+1E8W7DFlZo0ojtLpBa76IA0Sj0EjtusXesBINnIMoCG/PazgqAZ6uwLMQIo+oU2ZrEkjYp0ilncxKbXfQrUX99wX/nl9lvG87rawiEwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/f9826f57bf77405cc9f453197e1c74a8/e5715/loginadius-facebook-img3.png\"\n        srcset=\"/static/f9826f57bf77405cc9f453197e1c74a8/a6d36/loginadius-facebook-img3.png 650w,\n/static/f9826f57bf77405cc9f453197e1c74a8/e5715/loginadius-facebook-img3.png 768w,\n/static/f9826f57bf77405cc9f453197e1c74a8/46435/loginadius-facebook-img3.png 1885w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"step-4\" style=\"position:relative;\"><a href=\"#step-4\" aria-label=\"step 4 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 4</h4>\n<p>Input display name and contact email. Once you have done so, click on <strong>Create App ID</strong></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.46153846153846%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABQ0lEQVQoz5WSyU7DMBCG8yYgKhYJwY0LqlSEBDQFKbS0CcsrNF14K96BCzdunLhzRbRJKVmcOM6P7axqCIKRPnlG4xn/Y1vZ3dvHze0ddOO6wkA30Nf1hIFRgy4R+xuNTSiT6T2EfS6XICSA43pwPV/yX+v1+lCG5giMxfiYzWDbC8wtW2Jx33FceJ6HL76SIOD7WIUoiiTCNK0LxRyNZSCaEUIQx3FOUlAUl3Or+2TDy1LDTJErRuZkvlgpjfLCOpVFQz6ybDi34Pn+r4X1DcsKzUShy+/K94l8GDG6Two/DCnYXxUOU4VhGOYXnEEzaFTJyTzlBzF+Haz0KOPJVAY0PYULSWOAhDECmhD/8E3EVE8v73h4fMPz6wJa9wrK1vYOOucXOGurnI6krXLaKWopVldiTrN1goPDYzSPTrG2voFvAE6ilga5ZWMAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/ee19125fdb7fcd13e0e1130e97f3f7a7/e5715/loginadius-facebook-img4.png\"\n        srcset=\"/static/ee19125fdb7fcd13e0e1130e97f3f7a7/a6d36/loginadius-facebook-img4.png 650w,\n/static/ee19125fdb7fcd13e0e1130e97f3f7a7/e5715/loginadius-facebook-img4.png 768w,\n/static/ee19125fdb7fcd13e0e1130e97f3f7a7/612f7/loginadius-facebook-img4.png 773w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"step-5\" style=\"position:relative;\"><a href=\"#step-5\" aria-label=\"step 5 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 5</h4>\n<p>In the security check, Complete the security steps and click on the <strong>submit</strong> button.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 584px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 52.56849315068494%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAByUlEQVQoz5VSTW/TQBTMr+VcAScOCKmBA0WiCErTpk6U1ikiIaFcQOLOoReExKGUqvkoqZOsYzux1+u1E3t4u65RhVRUnjR6M9J63rwnl55VP+Np5SM2dj7h0eYH3C23cP9JG/cet4i/vTXW1lsob1RQGk1DnA0YfvYYTvsMJ+cMP86nxG0MLB/9ywV6owUG1BUf/IX+FYbjAOZhCyVkK/iLOThB8AAiDBCFPmQU4n/r6Og9GVKFoUAkZY4oQhwnkHGMZSJxORP48m1KPEaaZjcg1YbdbhelLMvgeR4sa4zJZELd0qaSzFfLBMPRBMdfTxGTVqXeKxR1XXc6nTyhEAJJklAyqY0KqMRzz4XrMNoivL2hlGSWLJFee3hTFQYKxcqFoV45SVLMnLkG5+LqhvGflCq9lKTjJVar9J/DdEJ1G8dxaC1Xd8YYXFfxXNu2TcOIewv4AdcDFYIgxEnPxtlwhoCH+jztdjtfmXOuk+g0+gOhoXihBd1QvfODQP9SF5aDh9vHePnmO4a/xmA0+J0ybDT2YRgGarU6avU69vZq2KnmqOwa2NXaQGP/AM1mE6ZpUjdxQL1qNPD8xRa2Xm/jwfor3Fkr4zcYZx1e6ZQSFQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/efbf9d763ad5dc1ded34050d8a408b74/e05eb/loginadius-facebook-img5.png\"\n        srcset=\"/static/efbf9d763ad5dc1ded34050d8a408b74/e05eb/loginadius-facebook-img5.png 584w\"\n        sizes=\"(max-width: 584px) 100vw, 584px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"step-6\" style=\"position:relative;\"><a href=\"#step-6\" aria-label=\"step 6 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 6</h4>\n<p>Once you land on the App dashboard, Select Facebook Login, and click <strong>Set Up</strong>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.76923076923077%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABqUlEQVQoz21S0W7bMAzM/3/NXvdWYMCAPqwv3dp0TVLETSzLkm3JkiXLTnqj6GxL1xkg7kBR5PHkVVU3kBQZy0pDyMxbSJWjYawu50vuErX+cJ5j9bvwKBR2LwXqWkJrjVJIiMsQ1VED/XegkITa0XnL/HrYKqsTyqArn/DmCmx+PqHYPePsDvBqhzRP2K87aOGJJzg/IIwzYvkDsdfMle7+NF1l2aLu4OoNgDfcPVR43Crkb7YF4+OthNxb5tM0M47bLzj7mrlu/tdQvXBxiCOGEDGdgFNW6Rxa26DpGoxjwpgSPKlUxsP0DpHqdWuuGmYzaWVTrhHNkST0wCDg1p8wHL9hiKToTM0JjO1p5QBPA2kZzDQ151Rj/lXYoms1VRh8f95jWxxoJ4ngDV98kF9R2h3zEJdmn19vcLCCef1+5eWljAvsx7a0eFUD8zSfGDfVPVRfXjycGG/3d6jt4rX62LCB7T3mmV5v8ByJvEp0OZIi34/kZWD/UpqWM58Qw8gD3nt4+THbrkfIBaQqhyXD+/yLUG4mA/OD5Vz2MMREuRMPzLlrhb8AKEf4I6SYIJQAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/a31c9add537406960d222f19891bb897/e5715/loginadius-facebook-img6.png\"\n        srcset=\"/static/a31c9add537406960d222f19891bb897/a6d36/loginadius-facebook-img6.png 650w,\n/static/a31c9add537406960d222f19891bb897/e5715/loginadius-facebook-img6.png 768w,\n/static/a31c9add537406960d222f19891bb897/1d499/loginadius-facebook-img6.png 1632w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"step-7\" style=\"position:relative;\"><a href=\"#step-7\" aria-label=\"step 7 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 7</h4>\n<p>Click on Settings in the sidebar under Facebook Login. Turn on Client OAuth Login. Turn on Web OAuth Login. Put the valid redirect URL on <strong>\"Valid OAuth redirect URIs\"</strong>. Click on the Save button.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 39.53846153846154%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAABN0lEQVQoz2WR227EIAxE9///ro9VpT60q80SAgQS7pCpIYn2UksjYouMj81FCIGcM3Kp0HKCnhisdSiUl1IeZ33ktX3Xdm6Qs8EwCjAuuy5SSrRIucIO30i3T4iRQZsVzvku61xv4n3optu2dbVQzZA9GWpjEGPshJbfEPgPkYpuEEPAdpA1M84nCKmOCcrD8Jnwzth+yQX4mBBChNILpNLQy4ozWsOZ6q1mybzugP3uC6FZDFJK/YfVaAQ9Qd5+YPgAKxnSIl9U7AyEBZs3gNdQSr0SJhq3LTlTy3W8YuZ3aDGi+BU1WNK6i/JeO+vRoy4TFGcYuAI7TC/nSCkXOCJ0aoQYfjthXhSq0/9lNdERYTKY3wnP18pkuNKLxlT6LndlhHelDE97ZpPGx9eE6yAxktH9MP0D/YBpMq/9JuIAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/d23cd26ebfc6f1e63b8c71e3c3561e6d/e5715/loginadius-facebook-img7.png\"\n        srcset=\"/static/d23cd26ebfc6f1e63b8c71e3c3561e6d/a6d36/loginadius-facebook-img7.png 650w,\n/static/d23cd26ebfc6f1e63b8c71e3c3561e6d/e5715/loginadius-facebook-img7.png 768w,\n/static/d23cd26ebfc6f1e63b8c71e3c3561e6d/3d405/loginadius-facebook-img7.png 1348w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"step-8\" style=\"position:relative;\"><a href=\"#step-8\" aria-label=\"step 8 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 8</h4>\n<p>Click on Basic under settings in the sidebar. Under App, Domains include your website Url. Enter all the required details. Change the status of the app from Development to Live from the top-right corner. Click on the <strong>Save Changes</strong> button.</p>\n<p>Now your Facebook app is ready. You can start implementing Facebook login\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.46153846153847%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAABUUlEQVQoz2WRjXKDIBCE8/4v2E5nOrVNjKKA/KmA4PYgJk1bZtbTU77blRMXEsZarKuH0gbTpKGNxTwvcE+al/WoHvraQJzfMRkHKRXYwDFyiZFYJy4EFvo4bolADlrfYKVXILXSs6CNrvY9ljUc8hBkgI3yoZOQkjYu8D5AW4eBJq1howEZgRQT1Ziq6xAjYtxqDaHcR0gCdkxUWD8Icsg5ckrIO2DZF+b2DdAdoK7Yi6YrsrzAKFkd5ZxR1r7v5UpAU0EPh87NFGlGoveu+4A7v2JlDeL4WZWnFmlsoDjDpAw5C9VZIucFWhz+Alo6kIUiF4duEjBDC8t7RCuR3AR4hyRbyOYFTvQIisGrEYmcY/OQyqJn/AeYKG6ZVCaWSMrMkNodkW5rjx5uuMDxDkGPBB2RDQfydgCfHN43FaClQyk/v546xSrQKvxf997fyN/r0WftIyhcFQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Facebook Login\"\n        title=\"Facebook Login\"\n        src=\"/static/ad6fe0cf1bcb752d3ad0798cf4030d78/e5715/loginadius-facebook-img8.png\"\n        srcset=\"/static/ad6fe0cf1bcb752d3ad0798cf4030d78/a6d36/loginadius-facebook-img8.png 650w,\n/static/ad6fe0cf1bcb752d3ad0798cf4030d78/e5715/loginadius-facebook-img8.png 768w,\n/static/ad6fe0cf1bcb752d3ad0798cf4030d78/3d405/loginadius-facebook-img8.png 1348w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"data-selection\" style=\"position:relative;\"><a href=\"#data-selection\" aria-label=\"data selection permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Data Selection</h3>\n<p>When a user logs into your website or app via Facebook Login, you can access the user's data stored on Facebook. Facebook only allows the basic profile data permissions for a new Facebook app.  To get more data according to your business requirement,  you need to enable additional permissions on your Facebook app. Facebook is supporting around <a href=\"https://developers.facebook.com/docs/permissions/reference\">42 permissions</a>. You need to choose user data that you want to collect from Facebook. </p>\n<h3 id=\"submit-your-facebook-login-app-for-review\" style=\"position:relative;\"><a href=\"#submit-your-facebook-login-app-for-review\" aria-label=\"submit your facebook login app for review permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Submit Your Facebook Login App For Review</h3>\n<p>To grab more than basic profile data points or asking for additional permissions from your users, your Facebook apps go through the review process. Sometimes businesses require some additional permissions on the Facebook app and for that, you need to submit your Facebook app for approval before starting to ask for additional information. </p>\n<p>The Facebook app review process is pretty much simple, Please refer to this document <a href=\"https://www.loginradius.com/docs/api/v2/admin-console/social-provider/app-reviews/facebook-app-review/\">here</a> for the Facebook App Review Process. </p>\n<h3 id=\"add-login-with-the-facebook-button-on-your-site\" style=\"position:relative;\"><a href=\"#add-login-with-the-facebook-button-on-your-site\" aria-label=\"add login with the facebook button on your site permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add Login with the Facebook button on Your Site</h3>\n<p>Implement Facebook login to a web page is very easy using Facebook’s JavaScript SDK. Facebook is providing <a href=\"https://developers.facebook.com/docs/facebook-login/web\">documentation and instructions</a> along with code examples to implement the login system. </p>\n<p>Let's see how we can add the Facebook login interface. For this, we just need to copy and paste the code provided to us by Facebook. Here I have added some customization to the existing code </p>\n<p>Place this code in the body section of your HTML code. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!-- </span><span class=\"mtk12\">The</span><span class=\"mtk1\"> </span><span class=\"mtk12\">JS</span><span class=\"mtk1\"> </span><span class=\"mtk12\">SDK</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Login</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Button</span><span class=\"mtk1\"> --&gt;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">fb</span><span class=\"mtk1\">:</span><span class=\"mtk10\">login-button</span><span class=\"mtk1\"> </span><span class=\"mtk12\">scope</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;public_profile,email&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onlogin</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;checkLoginState();&quot;</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">fb</span><span class=\"mtk1\">:</span><span class=\"mtk10\">login-button</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!-- </span><span class=\"mtk12\">The</span><span class=\"mtk1\"> </span><span class=\"mtk12\">JS</span><span class=\"mtk1\"> </span><span class=\"mtk12\">SDK</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Login</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Button</span><span class=\"mtk1\"> --&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">id</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;status&quot;</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n<p>Now you need to include the JavaScript section. It'll loads the Facebook SDK JavaScript asynchronously.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!-- </span><span class=\"mtk12\">Load</span><span class=\"mtk1\"> </span><span class=\"mtk12\">the</span><span class=\"mtk1\"> </span><span class=\"mtk12\">JS</span><span class=\"mtk1\"> </span><span class=\"mtk12\">SDK</span><span class=\"mtk1\"> </span><span class=\"mtk12\">asynchronously</span><span class=\"mtk1\"> --&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">script</span><span class=\"mtk1\"> </span><span class=\"mtk12\">async</span><span class=\"mtk1\"> </span><span class=\"mtk12\">defer</span><span class=\"mtk1\"> </span><span class=\"mtk12\">crossorigin</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;anonymous&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">src</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;https://connect.facebook.net/en_US/sdk.js&quot;</span><span class=\"mtk17\">&gt;&lt;/</span><span class=\"mtk4\">script</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n<p>Next, we'll add the Facebook init function. We just need to replace the app id placeholder with the app id of your app you created in the beginning. You’ll find the placeholder in this line appId: '{your-app-id}'. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">window</span><span class=\"mtk1\">.</span><span class=\"mtk11\">fbAsyncInit</span><span class=\"mtk1\"> = </span><span class=\"mtk4\">function</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">init</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">appId      :</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;{your-app-id}&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">cookie     :</span><span class=\"mtk1\"> </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,                     </span><span class=\"mtk3\">// Enable cookies to allow the server to access the session.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">xfbml      :</span><span class=\"mtk1\"> </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,                     </span><span class=\"mtk3\">// Parse social plugins on this webpage.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">version    :</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;v7.0&#39;</span><span class=\"mtk1\">           </span><span class=\"mtk3\">// Use this Graph API version for this call.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    });</span></span></code></pre>\n<p>Next, we need to add the function that handles the response and alters the page contents based on the type of response. I have added this function at the very top of the scripts section.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">checkFacebookLoginStatusCallback</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) {  </span><span class=\"mtk3\">// Called with the results from FB.getLoginStatus().</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39; Checking Facebook Login Status&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">);                   </span><span class=\"mtk3\">// The current login status of the person.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">response</span><span class=\"mtk1\">.</span><span class=\"mtk12\">status</span><span class=\"mtk1\"> === </span><span class=\"mtk8\">&#39;connected&#39;</span><span class=\"mtk1\">) {   </span><span class=\"mtk3\">// Logged into your webpage and Facebook.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">getUserProfile</span><span class=\"mtk1\">();  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    } </span><span class=\"mtk15\">else</span><span class=\"mtk1\"> {                                 </span><span class=\"mtk3\">// Not logged into your webpage or we are unable to tell.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementById</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;status&#39;</span><span class=\"mtk1\">).</span><span class=\"mtk12\">innerHTML</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;Please login with Facebook into this webpage.&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span></code></pre>\n<p>As you can see, the above function receives a response variable and checks it's status. If it is connected it fetches the logged in users info and outputs this information in the console of your browser, that area is where you could build more onto this script to handle the data. When the login is not authorized, this function changed the HTML on your page to ask you to log in.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">checkLoginState</span><span class=\"mtk1\">() {               </span><span class=\"mtk3\">// Called when a person is finished with the Login Button.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getLoginStatus</span><span class=\"mtk1\">(</span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) {   </span><span class=\"mtk3\">// See the onlogin handler</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">checkFacebookLoginStatusCallback</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    });</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getLoginStatus</span><span class=\"mtk1\">(</span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) {   </span><span class=\"mtk3\">// Called after the JS SDK has been initialized.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">checkFacebookLoginStatusCallback</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">);        </span><span class=\"mtk3\">// Returns the login status.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    });</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">getUserProfile</span><span class=\"mtk1\">() {                      </span><span class=\"mtk3\">// Get User Profile using Facebook Graph API after login.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Welcome!  Fetching your profile information.... &#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">api</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;/me&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Successful login for: &#39;</span><span class=\"mtk1\"> + </span><span class=\"mtk12\">response</span><span class=\"mtk1\">.</span><span class=\"mtk12\">name</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementById</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;status&#39;</span><span class=\"mtk1\">).</span><span class=\"mtk12\">innerHTML</span><span class=\"mtk1\"> =</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk8\">&#39;Thanks for logging in, &#39;</span><span class=\"mtk1\"> + </span><span class=\"mtk12\">response</span><span class=\"mtk1\">.</span><span class=\"mtk12\">name</span><span class=\"mtk1\"> + </span><span class=\"mtk8\">&#39;!&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    });</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span></code></pre>\n<p>Now if you save this page as login.html and open it in a browser you should see the Facebook Login button. You can also download this code from my <a href=\"https://github.com/VijayShekhawat/login-with-facebook\">GitHub Repo</a> and I have customized it to make it a bit shorter for an explanation.</p>\n<p>Now just Log In and check the console output. You’ll now see some basic info including id, email, first<em>name, gender, last</em>name.</p>\n<p>This is all there is to it. Of course, there are many more options and features available in Facebook documentation to discover.</p>\n<h3 id=\"closing-thoughts\" style=\"position:relative;\"><a href=\"#closing-thoughts\" aria-label=\"closing thoughts permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Closing Thoughts</h3>\n<p>Social Media platforms are growing day-by-day and simplifying the registration and login process. Consumers can use their existing social identities to register and log in. They don't need to create a separate username/password combination so it is simplifying the Sign in/Signup process.</p>\n<p>LoginRadius supports Sign with Facebook with more than 40 other popular social networks google, twitter, Linkedin, etc. You can implement all the popular social media providers on your website or mobile app in less than 60 seconds.</p>\n<h3 id=\"source\" style=\"position:relative;\"><a href=\"#source\" aria-label=\"source permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Source</h3>\n<p><a href=\"https://www.statista.com/statistics/278414/number-of-worldwide-social-network-users/\">statista</a> </p>\n<p><a href=\"https://news.netcraft.com/archives/2020/01/21/january-2020-web-server-survey.html\">netcraft</a> </p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk17 { color: #808080; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n</style>","headings":[{"value":"Create Your Facebook Login App","depth":3},{"value":"Step 1","depth":4},{"value":"Step 2","depth":4},{"value":"Step 3","depth":4},{"value":"Step 4","depth":4},{"value":"Step 5","depth":4},{"value":"Step 6","depth":4},{"value":"Step 7","depth":4},{"value":"Step 8","depth":4},{"value":"Data Selection","depth":3},{"value":"Submit Your Facebook Login App For Review","depth":3},{"value":"Add Login with the Facebook button on Your Site","depth":3},{"value":"Closing Thoughts","depth":3},{"value":"Source","depth":3}],"fields":{"slug":"/engineering/login-with-facebook/"},"frontmatter":{"metatitle":null,"metadescription":null,"description":"This article will explain about social login benefits and how we can implement Sign In using Facebook on our website or mobile app.","title":"How to implement Facebook Login","canonical":null,"date":"September 16, 2020","updated_date":null,"tags":["Login With Facebook","Facebook","Facebook Login","Login","Oauth"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.6666666666666667,"src":"/static/4e677331ecf5f923c5e08c812bca0026/4d6e7/index.png","srcSet":"/static/4e677331ecf5f923c5e08c812bca0026/f5f11/index.png 200w,\n/static/4e677331ecf5f923c5e08c812bca0026/6d133/index.png 400w,\n/static/4e677331ecf5f923c5e08c812bca0026/4d6e7/index.png 550w","sizes":"(max-width: 550px) 100vw, 550px"}}},"author":{"id":"Vijay Singh Shekhawat","github":"code-vj","bio":"He is the Lead Product Architect @LoginRadius. He loves working with technology and building something new. He is also a breakthrough thinker, DevOps guy, and cybersecurity enthusiast.","avatar":null}}}},"pageContext":{"id":"d2908f6b-cd0a-5350-8ca0-0874d84b885b","fields__slug":"/engineering/login-with-facebook/","__params":{"fields__slug":"engineering"}}},"staticQueryHashes":["1171199041","1384082988","1711371485","1753898100","2100481360","229320306","23180105","528864852"]}