Code how to integrate facebook login in angular2 framework .
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


##Learn how to integrate Facebook login in angular2 framework. As there is no good angular2 component available for same, I struggled a bit searching on internet and tried to figrued out how to do it with angular 2. in the last, after spending more than 10 hours, I figured out by modifying the current integration code and making it suitable for integration with angular 2. Looking back, it is very easy and straight forward. but I am adding the componentized code here so that no one else loses a night on the same problem.


  1. I have used bootstrap css and bootstrap-social css library for the HTML button. include the following lines in your index.html code
<link href="" rel="stylesheet">
<link href="" rel="stylesheet">
  1. For facebook, I have used facebook javascript SDK. just add the following line in your index.html
<script src="//"></script>

##Steps for integration:

  1. Copy the 'facebooklogin.component.ts' file in your components directory of your project.
  2. Copy the 'facebooklogin.html' in the place where you keep htmls. In case, you are not using templateUrl but using template in your component , then copy the HTML code in template
  3. copy <facebook-login></facebook-login> HTML tag in the place you want to show the facebook login button.

It should work as it is. If you face errors, let me know or fork it and improve it. I have created this only for my project use, but will be happy to fix any issue if i find time.