0

I want to open the Facebook messenger on Android.

To do this on iOS, you simply need to do the following (as described here: 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
    });

How would you do this on Android?

Yahya Uddin
  • 26,997
  • 35
  • 140
  • 231

1 Answers1

2

Actually, there's no such method for Android yet using native Ti.Facebook module. You can see at this link Ti.Facebook that it's only for iOS & starting from Ti SDK 5.4.0

In David's answer, he missed the very first line of that code file which says this:

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

But you can still try to open the messenger dialog on Android using Intents as described here Android Intents in Titanium

You can search Google for similar questions & I hope you can find plenty of them. Here's one such example FB Messenger Intent

Prashant Saini
  • 3,539
  • 1
  • 10
  • 24