Adding the template file

Let's now add the component's template file, that contains the Login with Facebook button. Create a new login.facebook.component.html file in the same folder of the preceding .ts file and fill it with the following content:

<div class="fb-login-button"      data-max-rows="1"      data-size="medium"      data-button-type="login_with"      data-show-faces="false"      data-auto-logout-link="false"      data-use-continue-as="false"     data-scope="public_profile,email"     ></div>

In case we don't like how it looks, we can generate our very own Facebook Login button from https://developers.facebook.com/docs/facebook-login/web/login-button/.

Just ensure to respect the value of the data-scope attribute, as these are the user information relevant fields ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.