title: How to Integrate Linkedin in Angular2
body: <p>I have problem regarding LinkedIn Authentication in Angular2 my code is.</p>
  
  <pre><code>import {Component , OnInit , NgZone} from 'angular2/core';
  import {HTTP_PROVIDERS} from 'angular2/http';
  import {ROUTER_DIRECTIVES , Router} from 'angular2/router';
  
  declare var IN : any;
  
  @Component({
    directives : [ROUTER_DIRECTIVES],
    selector : '.main',
    providers : [HTTP_PROVIDERS],
    templateUrl : './app/registration/employee.reg.html'
  })
  
  export class EmployeeRegistrationComponent implements OnInit{
  
   constructor(private zone : NgZone){
      this.zone.run(() =&gt; {
          $.proxy(this.OnLinkedInFrameworkLoad, this);
      });
  }
  
  ngOnInit(){
      var linkedIn = document.createElement("script");
      linkedIn.type = "text/javascript";
      linkedIn.src = "http://platform.linkedin.com/in.js";
      linkedIn.innerHTML = "\n"+
          "api_key: **********\n" +
          "authorize: true\n" +
          "onLoad:" + this.OnLinkedInFrameworkLoad ;
      document.head.appendChild(linkedIn);
  
      var script = document.createElement("script");
      script.type = "in/Login";
      document.body.appendChild(script);
  }
  
  OnLinkedInFrameworkLoad = () =&gt; {
      IN.Event.on(IN, "auth", this.OnLinkedInAuth);
  }
  
  OnLinkedInAuth = () =&gt; {
      IN.API.Profile("me").result(result =&gt; this.ShowProfileData);
  }
  
  ShowProfileData(profiles) {
      console.log(profiles);
      var member = profiles.values[0];
      var id=member.id;
      var firstName=member.firstName;
      var lastName=member.lastName;
      var photo=member.pictureUrl;
      var headline=member.headline;
  
      //use information captured above
     }
  
  }
  </code></pre>
  
  <p>Console Throwing Error : <code>angular2-polyfills.js:1250 Uncaught Error: Could not execute 'function () {'. Please provide a valid function for callback.</code></p>
  
  <p>Please Help me out what is wrong I'm doing...</p>