My code:
export class TestComponent implements OnInit {
constructor() { }
ngOnInit() {
FB.getLoginStatus(function (response) {
this.ParseFacebookLoginStatus(response);
});
}
ParseFacebookLoginStatus(response) {
console.log(response.status);
}
My console is outputting ERROR TypeError: this.ParseFacebookLoginStatus is not a function
.
I just guessing here that getLoginStatus is async and this in the result context insnt my TestComponent? How can I return to my TestComponent with a proper callback?