{
"id": "154502",
"key": "AC-1682",
"fields": {
"issuetype": {
"id": "1",
"description": "A problem which impairs or prevents the functions of the product.",
"name": "Bug",
"subtask": false
},
"project": {
"id": "12217",
"key": "AC",
"name": "Appcelerator - INBOX",
"projectCategory": {
"id": "10000",
"description": "",
"name": "Customer Service"
}
},
"resolution": {
"id": "3",
"description": "The problem is a duplicate of an existing issue.",
"name": "Duplicate"
},
"resolutiondate": "2016-01-28T06:08:06.000+0000",
"created": "2016-01-25T17:30:05.000+0000",
"labels": [
"facebook",
"ios",
"mobilesdk"
],
"versions": [],
"issuelinks": [],
"assignee": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"updated": "2016-03-08T07:38:10.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": [],
"description": "test case:\r\n1. Make sure the proper properties are set: \r\nhttps://github.com/appcelerator-modules/ti.facebook/blob/master/ios/README.md\r\n\r\n2. Initialize facebook: \r\n\r\n{code:javascript}\r\n\t var FB = require('facebook');\r\n\r\n\t var shareParams = {\r\n link: URL,\r\n title: TITLE,\r\n description: \" \", //deprecated \r\n picture: PIC_URL\r\n };\r\n \r\n //FB.display = \"popup\";\r\n //FB.appid = Alloy.CFG.facebookProperties.appid;\r\n //FB.permissions = Alloy.CFG.facebookProperties.permissions;\r\n //FB.forceDialogAuth = true;\r\n\r\n FB.initialize();\r\n \r\n FB.addEventListener('shareCompleted', function (e) {\r\n if (e.success) {\r\n Ti.API.info('FB - Share request succeeded.');\r\n } else {\r\n Ti.API.warn('FB - Failed to share.');\r\n Ti.API.warn(e.error);\r\n }\r\n });\r\n\r\n FB.presentShareDialog(shareParams);\r\n{code}\r\n\r\n3. Successfully share data (confirmed this works)\r\n\r\nAt this point the phone quits out of the facebook app and *restarts* the application. On Android it returns back to the application at its previous state correctly. \r\n\r\nAlso note the shareCompleted event never fires even though the share successfully goes through. \r\n\r\nAny help would be appreciated, any ideas why this would be the case? There are *no errors* reported on the console when this happens, for all intents it appears the app completely restarts. ",
"attachment": [],
"flagged": false,
"summary": "Ti.Facebook restarts application on sucessful share",
"creator": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"subtasks": [],
"reporter": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"environment": "MacOS X 10.10.5\r\nTi SDK 5.1.1.GA - 5.1.2.GA\r\niOS 9.2\r\nTi.Facebook 5.0.0",
"comment": {
"comments": [
{
"id": "375281",
"author": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"body": "Hello, I tried to test the project with Ti.Facebook with the below code. This is working as expected. The share works and also the share success alert shows. \r\n\r\nh5. Environment\r\n\r\nMacOS X 10.10.5\r\nTi SDK 5.1.2.GA\r\niOS 9.2\r\nTi.Facebook 5.0.0\r\n\r\nh5. Code\r\n{code}\r\n\r\nvar fb = require('facebook');\r\n\r\nvar win = Ti.UI.createWindow({\r\n title : 'Login/Logout',\r\n backgroundColor : '#fff',\r\n fullscreen : false\r\n});\r\n\r\nvar share = Ti.UI.createButton({\r\n title : 'SHARE ON FACEBOOK',\r\n width : Ti.UI.SIZE,\r\n height : Ti.UI.SIZE,\r\n top : 400,\r\n});\r\n\r\nshare.addEventListener('click', function() {\r\n fb.presentShareDialog({\r\n link : 'https://appcelerator.com/',\r\n name : 'great product',\r\n description : 'Titanium is a great product',\r\n caption : 'it rocks too',\r\n picture : 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png'\r\n });\r\n});\r\n\r\nfb.addEventListener('shareCompleted', function(e) {\r\n\r\n if (e.success) {\r\n\r\n Ti.API.info('FB - Share request succeeded.');\r\n\r\n } else {\r\n\r\n Ti.API.warn('FB - Failed to share.');\r\n\r\n Ti.API.warn(e.error);\r\n\r\n }\r\n\r\n});\r\n\r\nwin.add(share);\r\n\r\n{code}\r\nDid you follow the steps for configuring facebook module in [documentation|http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook-method-presentShareDialog] link?. Please provide the log and your ios section of in tiapp.xml file. Thanks.",
"updateAuthor": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"created": "2016-01-26T11:16:34.000+0000",
"updated": "2016-01-26T11:16:34.000+0000"
},
{
"id": "375291",
"author": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "The strange part about all this is it doesn't give any errors! The share goes through (i.e I can see the share post on the facebook wall). However the issue here is that it doesn't fire the sharecomplete event AND it restarts the app, again without errors on iOS. \r\n\r\nThe only thing different from my configuration from the appcelerator docs/github's readme is I'm not 100% on the FacebookDisplayName in the ios plist. \r\nGoing to try redo all of it just in case I missed something see if it still occurs, will be back in a bit with the results. ",
"updateAuthor": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-01-26T14:21:27.000+0000",
"updated": "2016-01-26T14:21:27.000+0000"
},
{
"id": "375322",
"author": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "First of all sorry for the delay, I thought I had it solved by just rewriting it but it appears it is NOT an issue with ios9, it IS an issue with iOS 8.3 (iphone 5s). Again sorry about that I mixed up my iOS versions. \r\n\r\nThis is my config:\r\n\r\n{code:javascript}\r\nvar fb = require('facebook');\r\n\r\nfb.initialize();\r\nfb.presentShareDialog({\r\n link : 'https://appcelerator.com/',\r\n name : 'great product',\r\n description : 'Titanium is a great product',\r\n caption : 'it rocks too',\r\n picture : 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png'\r\n});\r\n{code}\r\n\r\nand my tiapp.xml (condensed to the relevant sections):\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n CFBundleURLTypes\r\n \r\n \r\n CFBundleURLName\r\n \r\n ca.appname.m\r\n CFBundleURLSchemes\r\n \r\n \r\n fbXXXXXXXX\r\n \r\n \r\n \r\n FacebookAppID\r\n \r\n XXXXXXXXXXX\r\n FacebookDisplayName\r\n \r\n FB mobile app name\r\n LSApplicationQueriesSchemes\r\n \r\n fbapi\r\n fb-messenger-api\r\n fbauth2\r\n fbshareextension\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nIt shares successfully but closes and restarts the app. \r\n\r\nEDIT: I've put the code here https://gist.github.com/boarnoah/366ebd76ff5c5ad3865e since Jira's syntax highlighter is hard to work with. \r\n\r\nEDIT2: The issue persists whether or not the device has the Facebook app installed. \r\n",
"updateAuthor": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-01-26T21:53:17.000+0000",
"updated": "2016-01-26T22:01:10.000+0000"
},
{
"id": "375344",
"author": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"body": "Hello, I see you didn't provide the FB app name in your tiapp.xml. See the below ios section of tiapp.xml \r\n{code}\r\n \r\n \r\n CFBundleURLTypes\r\n \r\n \r\n CFBundleURLName\r\n \r\n com.gsl.shajib\r\n CFBundleURLSchemes\r\n \r\n \r\n fbXXXXXXXXXXXXXXX\r\n \r\n \r\n \r\n FacebookAppID\r\n \r\n XXXXXXXXXXXXXXX\r\n FacebookDisplayName\r\n \r\n AppcNew\r\n LSApplicationQueriesSchemes\r\n \r\n fbapi\r\n fb-messenger-api\r\n fbauth2\r\n fbshareextension\r\n \r\n \r\n \r\n{code}\r\n\r\nNow,\r\n{code}\r\n \r\n \r\n fbXXXXXXXXXXXXXXX\r\n \r\n{code}\r\nHere you put the facebook app id with addition to 'fb' at first.\r\n\r\n{code}\r\n FacebookAppID\r\n \r\n XXXXXXXXXXXXXXX\r\n FacebookDisplayName\r\n \r\n AppcNew\r\n{code}\r\nNow, here in the first string tag you provide only the facebook app id and in the second string tag you provide the name of the app. Lets say your FB app display name is \"AppcNew\". So you put the exact name here. Thanks.\r\n\r\n",
"updateAuthor": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"created": "2016-01-27T07:14:26.000+0000",
"updated": "2016-01-27T07:16:09.000+0000"
},
{
"id": "375349",
"author": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Sorry for the confusion:\r\n(line numbers below correspond to https://gist.github.com/boarnoah/366ebd76ff5c5ad3865e\r\nline 16 is fb + app id(from developer.facebook.com)\r\nline 22 is app id (developer.facebook.com) \r\nline 25 is app name (developer.facebook.com)\r\n\r\nI just replaced them with X or \"FB Mobile App Name\" for the purposes of example code.\r\nAgain, I'm fairly sure this code works because it executes and shares fine on iOS 9.0 (both with and without the fb app installed) and android. It even works correctly with iOS 8, it shares the message successfully BUT it closes and restarts the app without error messages which is the issue. \r\n\r\nSorry if I wasn't too clear with my example code. \r\n\r\nEDIT: I managed to capture an error message by launching it on the iOS simulator (iphone 6 plus iOS 8.1 and using this; tail -f ~/Library/Logs/CoreSimulator/*/system.log\r\n\r\nThe captured message:\r\n\r\n{code}\r\nJan 27 15:15:35 computer com.apple.CoreSimulator.SimDevice.39126AA9-9E22-4A0E-ADCC-3F148A3F0994.launchd_sim[6823] (UIKitApplication:ca.XXXXX.m[0xd21][7153]): Service exited due to signal: Segmentation fault: 11\r\n{code}\r\n\r\n\r\n",
"updateAuthor": {
"name": "adipa",
"key": "adipa",
"displayName": "Adipa Wijayathilaka",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-01-27T14:23:57.000+0000",
"updated": "2016-01-27T21:20:26.000+0000"
},
{
"id": "375400",
"author": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"updateAuthor": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"created": "2016-01-28T06:05:14.000+0000",
"updated": "2016-01-28T06:05:14.000+0000"
}
],
"maxResults": 7,
"total": 7,
"startAt": 0
}
}
}