[AC-4530] Facebook presentShareDialog doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2016-10-05T07:25:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Andrea |
Assignee | Shak Hossain |
Created | 2016-10-05T06:34:56.000+0000 |
Updated | 2016-10-06T05:59:36.000+0000 |
Description
Running the code below:
var fb1 = require("facebook");
fb1.initialize();
fb1.presentShareDialog({
link: 'http://www.google.com',
name: 'My Score: ' + Ti.App.Properties.getString('userPoints'),
description: 'Jira Debug',
picture: f.nativePath,
mode: fb1.SHARE_DIALOG_MODE_AUTOMATIC
});
nothing happens.
You need to either check if the app is installed using
canPresentShareDialog()
and adjust the present-mode accordingly, e.g. one of [these](https://github.com/appcelerator-modules/ti.facebook/blob/master/apidoc/Facebook.yml#L1202).- name: canPresentShareDialog summary: Checks if the device can support the use of the Facebook Share dialog from the Facebook App. type: Boolean since: 4.0.0 permission: read-only deprecated: since: 5.0.0 removed: 5.0.0 I'm using facebook module 5.2.0, so I can't check anything since canPresentShareDialog is removed. What alternative present-mode may i use? tks
Sorry, sure. You can just check if the url fb:// is available or set the mode to browser.