{ "id": "153862", "key": "MOD-2180", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17723", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-03-09T17:44:56.000+0000", "created": "2015-12-15T21:26:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "facebook", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:49:34.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14521", "name": "Facebook" } ], "description": "We should support the {{FBSDKMessanger}} API described [here|https://developers.facebook.com/docs/messenger/overview]. Primary features:\r\n- Share to messenger - [Example|https://scontent-frt3-1.xx.fbcdn.net/hphotos-xat1/t39.2178-6/11409205_307418696049199_2060123166_n.png]\r\n- Messenger Button - [Example|https://scontent-frt3-1.xx.fbcdn.net/hphotos-xtp1/t39.2178-6/11405237_1630498610538936_1982804213_n.png]\r\n- URL Handling - [Example|https://scontent-frt3-1.xx.fbcdn.net/hphotos-xfp1/t39.2178-6/11057186_656472024481466_949237797_n.png]", "attachment": [], "flagged": false, "summary": "Ti.Facebook: Support messenger API's", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 585, "state": "closed", "name": "2016 Sprint 5 SDK", "startDate": "2016-02-27T01:30:43.377Z", "endDate": "2016-03-12T01:30:00.000Z", "completeDate": "2016-03-14T11:50:17.995Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "373035", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "/cc [~msamah], [~cng]", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-12-15T21:26:25.000+0000", "updated": "2015-12-15T21:26:25.000+0000" }, { "id": "376168", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator-modules/ti.facebook/pull/43\r\n\r\nFeatures: Messenger buttons, messenger send dialog, messenger media share, invite dialog.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-05T22:34:47.000+0000", "updated": "2016-02-24T16:16:07.000+0000" }, { "id": "377671", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Will also include the changes from MOD-2200.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-23T21:24:55.000+0000", "updated": "2016-02-23T21:24:55.000+0000" }, { "id": "377779", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The PR is ready for review, demo:\r\n{code:javascript}\r\nvar FB = require(\"facebook\");\r\n\r\nFB.addEventListener(\"requestDialogCompleted\", function(e) {\r\n Ti.API.warn(e);\r\n})\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : \"#fff\",\r\n layout: \"vertical\"\r\n});\r\n\r\naddButtonWithModeAndStyle(FB.MESSENGER_BUTTON_MODE_CIRCULAR,FB.MESSENGER_BUTTON_STYLE_BLUE);\r\naddButtonWithModeAndStyle(FB.MESSENGER_BUTTON_MODE_CIRCULAR,FB.MESSENGER_BUTTON_STYLE_WHITE);\r\naddButtonWithModeAndStyle(FB.MESSENGER_BUTTON_MODE_CIRCULAR,FB.MESSENGER_BUTTON_STYLE_WHITE_BORDERED);\r\n\r\naddButtonWithModeAndStyle(FB.MESSENGER_BUTTON_MODE_RECTANGULAR,FB.MESSENGER_BUTTON_STYLE_BLUE);\r\naddButtonWithModeAndStyle(FB.MESSENGER_BUTTON_MODE_RECTANGULAR,FB.MESSENGER_BUTTON_STYLE_WHITE);\r\naddButtonWithModeAndStyle(FB.MESSENGER_BUTTON_MODE_RECTANGULAR,FB.MESSENGER_BUTTON_STYLE_WHITE_BORDERED);\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: \"Share media to messenger\"\r\n});\r\nbtn.addEventListener(\"click\", function(e) {\r\n var media = [\r\n Ti.UI.createView({height: 30,width:30,backgroundColor: \"#ff0\"}).toImage(), // Image blob\r\n Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"test.gif\").read(), // GIF Blob\r\n Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"movie.mp4\").read() // Video Blob\r\n ];\r\n\r\n var options = Ti.UI.createOptionDialog({\r\n options: [\"Photo\", \"GIF\", \"Video\", \"Cancel\"],\r\n cancel: 3\r\n });\r\n options.addEventListener(\"click\", function(e) {\r\n if (e.index == 3) {\r\n return;\r\n }\r\n FB.shareMediaToMessenger({\r\n media: media[e.index],\r\n metadata: \"Ti rocks!\",\r\n link: \"https://appcelerator.com\",\r\n //renderAsSticker: true\r\n });\r\n });\r\n options.show();\r\n});\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n title: \"Invite people\"\r\n});\r\n\r\nbtn1.addEventListener(\"click\", function(e) {\r\n FB.presentInviteDialog({\r\n\t appLink: \"https://fb.me/814669901978535\",\r\n\t appPreviewImageLink: \"https://www.mydomain.com/my_invite_image.jpg\"\r\n\t});\r\n});\r\n\r\nwin.add(btn);\r\nwin.add(btn1);\r\nwin.open();\r\n\r\nfunction addButtonWithModeAndStyle(mode, style) {\r\n var btn = FB.createMessengerButton({\r\n top: 20,\r\n mode: mode,\r\n style: style\r\n });\r\n\r\n btn.addEventListener(\"click\", shareOnMessenger);\r\n win.add(btn);\r\n}\r\n\r\nfunction shareOnMessenger() {\r\n FB.presentMessengerDialog({\r\n title: \"Hi\",\r\n description: \"More infos\",\r\n link: \"https://appcelerator.com\",\r\n to: []\r\n });\r\n}\r\n{code}\r\n\r\nMake sure to have the tiapp.xml configured properly, like this:\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n FacebookAppID\r\n 517802691665259\r\n FacebookDisplayName\r\n Ti.Tests\r\n CFBundleURLTypes\r\n \r\n \r\n CFBundleURLName\r\n de.hansknoechel.testapp\r\n CFBundleURLSchemes\r\n \r\n testapp\r\n fb517802691665259\r\n \r\n \r\n \r\n LSApplicationQueriesSchemes\r\n \r\n fbapi\r\n fbapi20130214\r\n fbapi20130410\r\n fbapi20130702\r\n fbapi20131010\r\n fbapi20131219\r\n fbapi20140410\r\n fbapi20140116\r\n fbapi20150313\r\n fbapi20150629\r\n fbauth\r\n fbauth2\r\n fb-messenger-api\r\n fb-messenger-api20140430\r\n \r\n \r\n \r\n \r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-24T16:18:18.000+0000", "updated": "2016-02-24T16:18:18.000+0000" }, { "id": "379419", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (titaniun_mobile/master): https://github.com/appcelerator/titanium_mobile/pull/7820", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-10T09:09:08.000+0000", "updated": "2016-03-10T09:09:08.000+0000" }, { "id": "391742", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~hansknoechel] Reviewed the above demo code, I am able to use all the buttons to send a message to another user, and I am able to share a video file via messenger. However I receive an error message when trying to send a Photo / GIF file:\r\n\r\n{{Can't Send Message: Something went wrong, please try again.}} \r\n\r\nAny idea on what could be causing this? The photo / GIF files appear correctly in the preview window before sending, but fails to send after numerous app / device restarts. ", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-07-27T22:44:42.000+0000", "updated": "2016-07-27T22:44:52.000+0000" }, { "id": "440228", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:34.000+0000", "updated": "2018-08-06T17:49:34.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }