私はfacebookユーザーのファーストネームをAPIで取得しようとしています。 これは私のコードNodejs、Request and Dot notation
var user = request("https://graph.facebook.com/v2.6/"+psid+"?fields=first_name,last_name&access_token="+token, function(err, res, body) {
console.log("name: " + body.first_name);
console.log("body: " + body);
});
でこれが結果です:
name: undefined
body: {"first_name":"Anton","last_name":"Rosato"}
名が定義されていないのはなぜ?
'あなたを与えますか? – Quentin