小编nav*_*vya的帖子

显示 [object object ] 而不是变量中的数据:ionic

这是我的代码

this.facebook.login(['email', 'public_profile']).then((response: FacebookLoginResponse) => {
      this.facebook.api('me?fields=id,name,email,first_name,picture.width(720).height(720).as(picture_large)', [])
      .then((profile: any) => {
        let userData = {
          email: profile['email'],
          first_name: profile['first_name'],
          picture: profile['picture_large']['data']['url'],
          username: profile['name'],
          id: profile['id']
        }
        alert(userData);
Run Code Online (Sandbox Code Playgroud)

在模拟器警报框中,它将输出显示为

[对象对象]

我该如何解决这个问题?

javascript typescript ionic3 angular

0
推荐指数
1
解决办法
1823
查看次数

标签 统计

angular ×1

ionic3 ×1

javascript ×1

typescript ×1