I have this code:
getThirdPartyID : function () {
return FB.api("/me?fields=third_party_id", function (userData) {
console.debug("Your Facebook ThirdPartyId is: " + userData["third_party_id"]);
return userData["third_party_id"];
});
},
But it returns empty. Whats the problem with this code? How can I access it with the same idea? tnx
FB.apiis function which doing asynchronous request to Facebook API and return nothing. You can only get results withincallback. You should leverage different approach to implement this: