Titanium.Android.Intent share on social media

I'm developing an App that shares news on "Only" native apps like Facebook, Twitter and LinkedIn.

I can't make intent shares custom to display only the apps I stated before. And using custom modules open apps in the browser.

I'm using titanium... So any help with this?



I am using the following intents to share on native Facebook and twitter apps:

var intFB = Ti.Android.createIntent({
    action : Ti.Android.ACTION_SEND,
    packageName : "com.facebook.katana",                        
    type : "text/plain"

intFB.putExtra(Ti.Android.EXTRA_TEXT, yourLink);
//facebook only supports LINKS(!!!)

var intTwitter = Ti.Android.createIntent({
    action: Ti.Android.ACTION_SEND,
    packageName: "com.twitter.android",     
    flags: Ti.Android.FLAG_ACTIVITY_NEW_TASK,
    type: "text/plain"

intTwitter.putExtra( Ti.Android.EXTRA_TEXT, yourMessage); 
//twitter supports any kind of string content (link, text, etc)
Ti.Android.currentActivity.startActivity( intTwitter );

Need Your Help

What's the proper way to check the object type for Generic object?

java object casting warnings instanceof

I got a warning message on Object Casting while compiling my code. I have no idea how to fix it with my current knowledge....

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.