Can someone please help me with this
getFriendList () {
let friends = null;
FB.api('/me/taggable_friends',{
fields: 'id,name,picture',
limit: 10,
access_token: this.state.fbResponse.authResponse.accessToken
}, (response) => {
friends = response.data.map(friend => {
return(
<Friend key={friend.id} />
);
});
});
return friends;
};
It is not returning the friends list. Always returns null. please help.
I'm getting 10 data. When I do console.log, It is printing.
Thanks in advance...