Facebook

All the invocation attributes related to the Facebook app require a Facebook account to be set up on the device.

Sharing text with Facebook

Here are the invocation attributes you use to share text with Facebook:

Attribute Value
Target ID

Facebook

Action

bb.action.SHARE

MIME type text/plain
URI data://
Data Text string to be shared

Sharing media with Facebook

Here are the invocation attributes you use to share media (pictures and video) with Facebook:

Attribute Value
Target ID

Facebook

Action

bb.action.SHARE

URI file:///path/to/content.png
File extensions .gif, .jpeg, .jpg, .png, .psd, .tiff, .tif, .3g2, .3gp, .3gpp, .asf, .avi, .dat, .flv, .m4v, .mkv, .mod, .mov, .mp4, .mpe, .mpeg4, .mpg, .nsv, .ogm, .ogv, .qt, .tod, .vob, .wmv
MIME type MIME type can specified in the following format: image/gif, image/jpeg, video/mov, video/mpeg4, and so on

Sharing a URL with Facebook

Here are the invocation attributes you use to share a URL with Facebook:

Attribute Value
Target ID

Facebook

Action

bb.action.SHARE

URI http://, https://

Entry Description
object_type

Specifies the type of the profile (for example, page for a business profile or user for a personal profile.

object_id

Specifies the numeric ID of the Facebook profile page. The numeric ID can be found within the URL of the Facebook profile page (for example, www.facebook.com/profile.php?id=328506290597521).

Here's a useful link to identify the profile ID of a Facebook profile.

Here's an example that shows how you can open a business profile page:
blackberry.invoke.invoke( {
target: "com.rim.bb.app.facebook",
action: "bb.action.OPEN",
metadata: JSON.stringify
    ({object_type : 'page' , object_id : '328506290597521'}) 
}, onSuccess, onError );

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus