【问题标题】:Target specific participant in Google Hangout API?针对 Google Hangout API 中的特定参与者?
【发布时间】:2012-07-12 02:41:09
【问题描述】:

我正在尝试将 Google Hangout 应用程序构建为游戏,但我不确定当前的 Google Hangout API 如何定位特定用户。因此,例如,如果我希望特定参与者成为唯一可以在应用程序中看到 div 的人,我将如何根据特定用户 ID 进行限制?

【问题讨论】:

    标签: google-plus hangout


    【解决方案1】:

    您可以通过 gapi.hangout.getParticipantById( gapi.hangout.getParticipantId() ) 获取当前用户的 Participant (详情请参阅https://developers.google.com/+/hangouts/api/gapi.hangout#gapi.hangout.getParticipantById)。

    Google ID 存储在 person.id 字段的 Participant 对象中(有关 Participant 对象的详细信息,请参阅https://developers.google.com/+/hangouts/api/gapi.hangout#gapi.hangout.Participant)。

    因此,一旦您拥有当前用户的参与者,您就可以检查 person.id 字段以查看它是否与相关人员匹配。但是,还有其他领域可能更适合您的确切需求,因此我鼓励您查看并尝试不同的领域和方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-02-11
      • 1970-01-01
      • 1970-01-01
      • 2019-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多