简体   繁体   English

Facebook 如何在没有标签的情况下发送通知

[英]How does Facebook send notifications without tab

  1. Go to facebook and allow HTML5 Desktop Notification for it.转到 facebook 并为其启用 HTML5 桌面通知。
  2. Close facebook tab.关闭脸书标签。
  3. Ask somebody to write you message on facebook.请某人在 facebook 上给你写消息。

Now u see the notification from facebook while facebook site isn't open.现在您可以在 facebook 网站未打开时看到来自 facebook 的通知。 HOW?如何?

They use the Push API - https://developer.mozilla.org/en-US/docs/Web/API/Push_API Quoting from there:他们使用推送 API - https://developer.mozilla.org/en-US/docs/Web/API/Push_API从那里引用:

The Push API gives web applications the ability to receive messages pushed to them from a server, whether or not the web app is in the Push API 使 Web 应用程序能够接收从服务器推送给它们的消息,无论 Web 应用程序是否在
foreground, or even currently loaded, on a user agent.前台,甚至当前加载,在用户代理上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Facebook 的 SDK 为即时游戏发送通知? - How to send notifications using Facebook's SDK for instant games? 当单击Facebook时,Facebook如何切换其通知中心图标以显示带有通知的各个DIV? - How does Facebook toggle its notification center icons to display the respective DIVs with the notifications when clicked? 接受web通知后,网站在浏览器没有打开该网站的标签时可以发送通知吗? - After accepting web notifications, can a website send notifications when browser has no tab open of this website? 没有输入标签的Facebook评论框如何工作? - How does Facebook comment box work without input tag? 如何将推送通知发送到goroost的别名 - How to send push notifications to aliases of goroost 反应中的网站图标/标签通知 - Favicon / tab notifications in react 如何在 Windows 10 中发送通知(Electron 最佳实践)? - How to send notifications in Windows 10 (Electron best practise)? gmail和Facebook如何在不更改整个HTML DOM的情况下更改URL路径? - How does gmail and facebook change the URL path without having to change the entire HTML DOM? 如何截取部分页面的屏幕截图以发送到Facebook - How to take a screenshot of part of the page to send to Facebook 如何留在窗口/选项卡上而不实际留在该选项卡上 - how to stay on window/tab without actually stay on that tab
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM