访问用于Zip Code的Facebook Graphi API
我使用JS来访问Facebook Graph API。 访问Location.name(城市,州)没问题,但我似乎无法访问此文档中列出的任何其他内容:https://developers.facebook.com/docs/graph-api/reference/location/
我认为问题在于我的Facebook应用程序中,我只请求了user_location,它只包含City,State。 但它不能让我选择请求具有更多参数的位置。
这是我的代码:
FB.api('/me?fields=id,first_name,last_name,email,gender,birthday,location', function (response) {
////console.log(response);
var tempName = response.first_name.split(" ");
var tempLastName = response.last_name.split(" ");
temp = {
id: response.id,
name: tempName[0],
lastname: tempLastName[0],
email: response.email,
gender: response.gender,
dob : response.birthday,
location: response.location.name,
zip: response.location.zip,
};
console.log(response.location.zip, "zip") //returns "undefined"
infoUser.push(temp);
validatorWords("FB", response.id);
});
链接地址: http://www.djcxy.com/p/35825.html