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: 148
Registered: ‎04-08-2013
My Device: Blackberry 10
My Carrier: Blackberry

Facebook and twitter photo upload and post message using cascade on BB10

Hi,
I want to upload photo and post text on Facebook and twitter using cascade on BB10. I find that there is mechanism called Invocation framework by using which we can share photo on Facebook and twitter but i did not find any sample for that. If anyone explore this on cascade please help me on this.

Contributor
Posts: 41
Registered: ‎04-27-2010
My Device: Z10
My Carrier: VIettel

Re: Facebook and twitter photo upload and post message using cascade on BB10

I suggest you using unbound invocation, this way will provide user bunch of options to share stuff such as facebook, twitter, email, bluetooth...

 

For QML, try:

 

InvokeActionItem {
            query {
                uri: "file:///path/to/images/anImage.jpg"
            }
        }

 Note that you must have the "file:///" 

 

For C++, try this:

 

// Create and send an invocation for the card target
InvokeManager* invokeManager = new InvokeManager();
InvokeRequest cardRequest;
cardRequest.setAction("bb.action.SHARE");
cardRequest.setURI("file://path/to/images/anImage.jpg");
InvokeReply* reply = invokeManager->invoke(cardRequest);
reply->setParent(this);

 

---
More applications/games here: http://appworld.blackberry.com/webstore/vendor/14299/
louis.keeper@gmail.com
haitt@viethop.net
http://blackberryvietnam.net
http://viethop.com
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Facebook and twitter photo upload and post message using cascade on BB10

It's pretty easy, take a look at the Social Invokcation sample:

 

https://github.com/blackberry/Cascades-Samples/tree/master/socialinvocation

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 148
Registered: ‎04-08-2013
My Device: Blackberry 10
My Carrier: Blackberry

Re: Facebook and twitter photo upload and post message using cascade on BB10

This sample is the answer for my question.But the problem is in this sample if trying to select any user profile or try to post text in FB or Twitter nothing happens.I logged into FB through the browser of my device,is this not sufficient ? I thing this sample does not give any option if user is not logged in.How can we check if the user is logged into the corresponding social site,If he is not logged in how can we show the corresponding log in page in our app?Is this possible using invocation framework
Contributor
Posts: 26
Registered: ‎08-25-2011
My Device: Z10
My Carrier: Bell

Re: Facebook and twitter photo upload and post message using cascade on BB10

Hi there!

 

I would like to share image with text.  socialinvocation exemple don't do this.  Do you know how to do that?