Chrome扩展程序InstanceID getToken

时间:2017-04-17 19:43:49

标签: google-chrome firebase google-chrome-extension google-cloud-messaging firebase-cloud-messaging

我正在尝试构建可以接收FCM推送消息的Chrome扩展程序。在浏览完文档之后,我假设我需要使用InstanceID API从我的扩展中生成令牌,并在将FCM消息推送到扩展时使用它。

为此,我使用了以下代码 -

chrome.instanceID.getToken({authorizedEntity: "my-project-ID", scope: "GCM"}, callback);

这是我收到的运行时错误 - {message: "Function was called with invalid parameters."}

现在有点困惑。

0 个答案:

没有答案
相关问题