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://

Opening a Facebook profile page

If you're using C++, here are the invocation attributes you use to open a personal or a business Facebook profile page:

Attribute Value
Target ID

com.rim.bb.app.facebook

Action

bb.action.OPEN

You must set the metadata of the request object to a QVariantMap that contains the following entries:

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, in C++:
QVariantMap payload;

payload["object_type"] = "page";
payload["object_id"] = "328506290597521";  // BlackBerry NA Facebook page

request.setMetadata(payload);

Last modified: 2014-09-30



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

comments powered by Disqus