Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 31
Registered: ‎05-18-2014
My Device: z10
My Carrier: du
Accepted Solution

Twitter share only text

Hi all,

 

This below code i am using to tweet on twitter...

 

_socialInvocation.invoke("Twitter", "bb.action.VIEW", "text/plain", "a://");

 

When i use this .. the text a:// is  also visible in the text area and also it is shared in the twitter..

 

I need to share only share text along with @twitterservice name

 

How to achive this... any help will be really greateful...

 

like  

_socialInvocation.invoke("Twitter""bb.action.VIEW""text/plain""@twiiterservcei "+ usertext.text);

 

Thanks in advance....

 

Developer
Posts: 21
Registered: ‎06-10-2014
My Device: blackberry z10
My Carrier: T-mobile

Re: Twitter share only text

[ Edited ]

Idk if this helps but to tweet something using QML i'm using this code

 

 

To update the query:

invoketwitter.query.data = "@yourtwittername " + tweetBody.text
invoketwitter.query.updateQuery();

 

To send the tweet

invoketwitter.trigger(invoketwitter.query.invokeActionId);

 

 

attachedObjects: [
Invocation {
id: invoketwitter

query.mimeType: "text/plain"
query.invokeTargetId: "Twitter"
query.invokeActionId: "bb.action.SHARE"

}
]

 

 

 

i also have something in c++ to view a profile of twitter

shouldn't be to hard to change it

 

void App::invokeTwitter()
{
bb::system::InvokeManager* m_invokeManager;
m_invokeManager = new InvokeManager(this);
InvokeRequest request;
request.setTarget("com.twitter.urihandler");
request.setAction("bb.action.VIEW");
request.setUri("twitter:connect:yourtwittername");
m_invokeManager->invoke(request);
}

Highlighted
Developer
Posts: 31
Registered: ‎05-18-2014
My Device: z10
My Carrier: du

Re: Twitter share only text

thank you.. it works...