【问题标题】:I'm trying to integrate Intercom into a meteor app using verso:intercom我正在尝试使用 verso:intercom 将 Intercom 集成到流星应用程序中
【发布时间】:2016-05-24 22:29:15
【问题描述】:

好的,所以我已经集成了它,它在基本层面上运行良好,但我有 2 个相关问题....

首先,我把这段代码放在哪里

IntercomSettings.userInfo = function(user, info) {
// add properties to the info object, for instance:
if (user.services.google) {
   info.email = user.services.google.email;
   info['Name'] = user.services.google.given_name + ' ' +    user.services.google.family_name;
   }
}

为了获取登录用户的信息,比如谷歌?我可以对 FB、LinkedIn 等做同样的事情吗?

其次,我如何将登录我的应用程序的用户信息发送到对讲机? (我正在获取 userId 、位置、访问的最后一页)

非常感谢。

【问题讨论】:

    标签: javascript node.js meteor single-page-application intercom


    【解决方案1】:

    所以,我把这个整理好了。将以下内容放在 client/lib/main.js....

    IntercomSettings.userInfo = function(user, info) {
        info.email = Meteor.user().emails[0].address;
        info['name'] = Meteor.user().username;
    };
    

    【讨论】:

      猜你喜欢
      • 2014-02-02
      • 2018-06-09
      • 1970-01-01
      • 2016-10-10
      • 1970-01-01
      • 2016-11-05
      • 2018-12-26
      • 2021-12-11
      • 1970-01-01
      相关资源
      最近更新 更多