The snippet below is supposed to get a friends list from a user's Facebook profile into my app:
<script
type="text/javascript"
src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php">
</script>
<script type="text/javascript">
FB_RequireFeatures(
["XFBML"],
function() {
FB.Facebook.init("xxxxxxxx","xd_receiver.htm");
FB.Facebook.get_sessionState().waitUntilReady(
function() {
FB.Facebook.apiClient.friends_get(
null,
function(result,ex){window.alert("friends list :" + result);}
);
}
);
}
);
</script>
Instead of name of my friends I get some integer. I couldn't guess why. It would be nice to know why my approach doesnt work.