What options are needed to share content from my BlackBerry WebWorks app through the built-in BlackBerry Twitter feature using Invoke?

I show a list of tweets in the BlackBerry WebWorks application that the user should be able to share via Twitter.

I want to use the BlackBerry Twitter client, and I call it through the invoke object. I can run the Twitter application well, but does anyone know what options are needed to go directly to sharing content from my application?

To successfully call the Twitter client, I use the following:

try{ var params = new Array(); var args = new blackberry.invoke.JavaArguments('net_rim_bb_twitter', params); blackberry.invoke.invoke(blackberry.invoke.APP_JAVA, args); }catch(e){ alert("Could Not Invoke App: "+e.name+" : "+e.message); } 

Thanks everyone!

+4
source share
1 answer

In WebWorks, you need to use JavaArguments (like you) to call another application, but do not add parameters, since it will not work, use only the module name:

 new blackberry.invoke.JavaArguments('net_rim_bb_twitter'); 

Thus, the code will try to call 'net_tim_bb_twitter'. Looking at BB github and how JavaArguments are implemented - it takes the first parameter and creates a URL request from Array arguments. If you add parameters like ["par = val", "par2 = val2"], then the code will try to run 'net_rim_bb_twitter? Par = val & par2 = val2 ", which will not start anything if the OS is not specified or The idea with a parameter is to call applications that listen to URLs.

Using without parameters will just launch the application, but it will not fill in the necessary fields in the application, so you need to create a screen in your application for publication on Twitter or just use the web intent https://dev.twitter.com/docs/intents and BrowserArguments to launch a small twitter web application pre-populated with data from your web application.

0
source

All Articles