I am trying to display user's profile image on the sidebar after he logs in using his FB account. Apparently, the data is loaded from Facebook but after the initialization of the page. Therefore, the image is not displayed as I would like. All I get is the empty thumbnail.
In console I get: Value below was evaluated just now
Beneath I can see all data needed that are properly loaded but not displayed. In .html section "script" I use:
function getFBData () {
FB.api('/me', function (response) {
fbinfo = new Array();
var im = document.getElementById("profileImage").setAttribute("src", "http://graph.facebook.com/" + response.id + "/picture?type=normal?callback=?");
});
public var id = response.id;
public var first_name = response.first_name;
public var last_name = response.last_name;
var email = response.email;
}
In component.ts file I implemented console.log(this.userDetails);