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
Regular Contributor
CrozyBB
Posts: 83
Registered: ‎07-19-2012
My Device: Bold 9790, Dev Alpha A
My Carrier: Koodo

BBM, Facebook, Twitter, FourSquare Integration and Invocation

I think for a lot of developers out there, they'll want to integrate the social features from networks like FB, Twitter, FS and share text, pictures and videos on BBM. I'd like to start up a thread to explain and track the integration of these features with the Cascades framework. If anyone out there has any insight, explainations or code please post it in this thread.

Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

[ Edited ]

Hi,

For social sharing you  can use Invocation framework given by the casecade. By using this framework you can easily integrate any of the social media into your application. Currently BBM, NFC, Blutooth is supported by invocation framework. Facebook, Twitter is also supported but for that both application need to install in your BB10 device then only invocation framwork give you option in your application.

 

Here is link in which they give description about invocation framwrok.

https://developer.blackberry.com/cascades/reference/bb__cascades__invocation.html

 

Below is the code by using which you can add share option in your context menu.

 

Example Code: 

InvokeActionItem {
title: "Share"
query {
mimeType: "image/jpg"
uri: "file:///accounts/1000/shared/camera/IMG_00000044.jpg";
invokeActionId: "bb.action.SHARE"
}
}

 


Note: Feel free to press like button if this answer helpful to you and if resolved your question then accept as a solution.

 

Please use plain text.
Regular Contributor
CrozyBB
Posts: 83
Registered: ‎07-19-2012
My Device: Bold 9790, Dev Alpha A
My Carrier: Koodo

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

Do you have the invokeTargetId for BBM?

Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

Hi, 

You have to set the invocationId to "bb.action.SHARE". If you only want to set the BBM then you have to use bound invocation query.

Please use plain text.
Regular Contributor
CrozyBB
Posts: 83
Registered: ‎07-19-2012
My Device: Bold 9790, Dev Alpha A
My Carrier: Koodo

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

I have it set to bb.action.SHARE. How do you use a bound invocation query? Do you have a code example of it?
Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

Hi,

I also not have target ID for the Bound query.

Please use plain text.
Administrator
MSohm
Posts: 14,268
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

Here are some examples of using invocation to invoke BBM.

 

InvokeActionItem {
            title: "Start BBM Chat"
            query {
                invokeActionId: "bb.action.BBMCHAT"
                uri: "pin:2732F6D7"
            }
        },
        InvokeActionItem {
            title: "Set BBM Avatar Pic"
            query {
                invokeTargetId: "sys.bbm.imagehandler"
                invokeActionId: "bb.action.SET"
                uri: "file:///path/to/your/file.png"
            }
        },
        InvokeActionItem {
            title: "Invite to BBM"
            query {
                invokeActionId: "bb.action.INVITEBBM"
                uri: "pin:2100000A"
            }
        },
        InvokeActionItem {
            title: "Share Text Over BBM"
            query {
                mimeType: "text/plain"
                invokeTargetId: "sys.bbm.sharehandler"
                invokeActionId: "bb.action.SHARE"
                data: "This is some text to share."
            }
        },
        InvokeActionItem {
            title: "Share Image Over BBM"
            query {
                invokeTargetId: "sys.bbm.sharehandler"
                invokeActionId: "bb.action.SHARE"
                uri: "file:///path/to/your/file.png"
            }
        }

 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
BeroboInc
Posts: 123
Registered: ‎07-08-2011
My Device: Torch 9800, Bold 9700
My Carrier: Bell, Rogers

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

This is very usefull thanks. Been looking for this.

 

Is there a definative list of invoketargetid's available to interact with the rim bb10 apps and other 3rd party apps?

 

Sending text via email would be handy as well.

 

 

Berobo Inc.
Police Scanner Radio / Alarm Clock lets you listen to Police scanners in your area!
http://www.berobo.com
_________________________________________________
Please click the Like button to thank the user that has helped you and
please mark post as solved when you have found the solution to your problem.
Please use plain text.
Developer
kylefowler
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

Foursquare has a bunch of invocation support that we will be documenting closer to launch date.
Like all of my posts
Please use plain text.
Regular Contributor
CrozyBB
Posts: 83
Registered: ‎07-19-2012
My Device: Bold 9790, Dev Alpha A
My Carrier: Koodo

Re: BBM, Facebook, Twitter, FourSquare Integration and Invocation

to share text in another app (i.e bbm) I get an error "type mismatch" on the "data:" line. I guess the system is looking for a QByteArray when we're trying to give it a string.

 

Is there a simple way to convert a string into a QByteArray right in the InvokeActionItem?

Please use plain text.