配置Google附近通知API以使用Facebook App Intent [英] Configure Google Nearby Notification API to use Facebook App Intent

查看:436
本文介绍了配置Google附近通知API以使用Facebook App Intent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google Beacon仪表板上预订附近通知时,是否可以传递Facebook的Android应用意图?我想在信标附近打开我公司的Facebook应用程序.如果可以做到,应该在intent和scheme参数中传递什么?

Is it possible to pass Facebook's Android App intent while subscribing for Nearby Notification on Google Beacon Dashboard? I want to open my company's Facebook Page on the Facebook App when in proximity of the Beacon. In case it can be done, what should be passed in intent and scheme parameters?

推荐答案

为实现此目的,您需要在信标中添加一个附近通知附件url.您可以在此处

In order to make this happen, you need to add a Nearby notification attachement url to your beacon. You can read an overview of how to do this here.

这是构造一个附加到您的信标的url的示例.为了转到Google的Facebook个人资料,您可以使用URL方案来启动本机应用程序,如下所示:

Here's an example of constructing a the url to attach to your beacon. In order to go to a Facebook profile of Google, you can use a URL scheme to launch the native app like this:

fb://profile/Google

由于可能未安装本机应用程序(com.facebook.katana),因此,如果未安装该应用程序,则附近允许您指定要在浏览器中启动的URL.您可以设置具有网络后备功能的应用程序意图URL,以便在附近"中使用,例如:

Since the native app (com.facebook.katana) may not be installed, Nearby allows you to specify a URL to launch in the browser if the app is not installed. You can set up an app intent URL with a web fallback for use on Nearby like this:

intent://profile/Google#Intent;scheme=fb;package=com.facebook.katana; \
S.browser_fallback_url=https%3A%2F%2Fwww.facebook.com%2FGoogle%2F;end

有关如何构建此类网址的更多信息,请参见此处.

See here for more info on how to construct such URLs.

这篇关于配置Google附近通知API以使用Facebook App Intent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆