Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/380.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在Parse中记录用户信息_Javascript_Html_Facebook_Facebook Graph Api_Parse Platform - Fatal编程技术网

Javascript 在Parse中记录用户信息

Javascript 在Parse中记录用户信息,javascript,html,facebook,facebook-graph-api,parse-platform,Javascript,Html,Facebook,Facebook Graph Api,Parse Platform,我已经使用解析javascript将facebook集成到我的应用程序中 我的问题归结如下: 1) 如何将first name=设置为facebook提供的名字,将last name=设置为facebook提供的信息 用户已经允许我查看他们的公共资料,所以我相信我可以获取这些详细信息。我的问题是如何以及如何将数据存储到parse中。 2) 如何检索facebook图片。从某种意义上说,在我的应用程序中,我可以从设备和facebook上传图片。我已经从设备上进行了训练,我正在尝试找出用户如何从fa

我已经使用解析javascript将facebook集成到我的应用程序中

我的问题归结如下: 1) 如何将first name=设置为facebook提供的名字,将last name=设置为facebook提供的信息

用户已经允许我查看他们的公共资料,所以我相信我可以获取这些详细信息。我的问题是如何以及如何将数据存储到parse中。 2) 如何检索facebook图片。从某种意义上说,在我的应用程序中,我可以从设备和facebook上传图片。我已经从设备上进行了训练,我正在尝试找出用户如何从facebook导入图片,其中限制为3,并且每张图片都与一个输出相关联,例如

截至目前,以下是我的登录代码:

 function fbLogin(){
    Parse.FacebookUtils.logIn("public_profile,email,user_friends", {
  success: function(user) {
    if (!user.existed()) {
                window.open("accountCreate.html", "_self");
    } else {
                      var city = user.get("city");

     if (city == "San Francisco") {
                window.open("neighbourhoodselectSF.html", "_self");
                } else if (city == "New York City"){
                window.open("neighbourhoodSelectNYC.html",  "_self");
    }
            else if (city != "San Francisco" || city != "New York City"){

                              window.open("accountCreate.html", "_self");

            }

    }
  },
  error: function(user, error) {
 if (user.existed()) {
                  var city = user.get("city");

     if (city == "San Francisco") {
                window.open("neighbourhoodselectSF.html", "_self");
                } else if (city == "New York City"){
                window.open("neighbourhoodSelectNYC.html",  "_self");
    }
            else if (city != "San Francisco" || city != "New York City"){

                              window.open("accountCreate.html", "_self");

            }
          }
              }
});
    }
任何帮助都将不胜感激