【问题标题】:Open Facebook Messenger using Titanium on Android在 Android 上使用 Titanium 打开 Facebook Messenger
【发布时间】:2017-11-22 17:21:20
【问题描述】:

我想在 Android 上打开 Facebook Messenger。

要在 iOS 上执行此操作,您只需执行以下操作(如此处所述:https://github.com/appcelerator-modules/ti.facebook):

   var fb = require('facebook');
   fb.presentMessengerDialog({
        title: "Appcelerator Titanium rocks!", // The title of the link
        description: "Shared from my Titanium application", // The description of the link
        link: "https://appcelerator.com", // The link you want to share
        referal: "ti_app", // The referal to be added as a suffix to your link
        placeID: "my_id", // The ID for a place to tag with this content
        to: [] // List of IDs for taggable people to tag with this content
    });

你会如何在 Android 上做到这一点?

【问题讨论】:

    标签: titanium appcelerator appcelerator-titanium titanium-alloy


    【解决方案1】:

    实际上,使用原生 Ti.Facebook 模块的 Android 还没有这样的方法。您可以在此链接 Ti.Facebook 看到它仅适用于 iOS 并且从 Ti SDK 5.4.0

    开始

    在大卫的回答中,他错过了代码文件的第一行:

    if (Ti.Platform.osname == "android") {
        Ti.API.warn("This feature is currently iOS-only.");
        return;
    }
    

    但您仍然可以尝试使用此处所述的 Intents 在 Android 上打开信使对话框 Android Intents in Titanium

    您可以在 Google 上搜索类似的问题,希望您能找到很多。这是一个这样的例子FB Messenger Intent

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-22
      • 2019-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-26
      • 2020-10-08
      相关资源
      最近更新 更多