{ "id": "135010", "key": "AC-1233", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-09-15T04:05:00.000+0000", "created": "2014-08-20T09:36:18.000+0000", "labels": [ "TCSupportTriage", "api", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:37.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I am working in facebook sharing using graph API but during develoment I'm facing following issues:\r\n\r\n1. Login event listener not callback but user has logged In at first time.\r\n\r\n2. In Second time some time facebook sharing working but next time it's giving me error which I've attached screenshot for the same. most of the time sharing done in first time but second time it's giving me error.\r\n\r\n\r\n\r\nBelow are the code which I'm using. Also I've added \"xxxxxxxxxxxxxxxxx\" in .xml and info.plist with key.\r\n\r\n Please provide me any solution: \r\n\r\n var data = {\r\n\t\t\tmessage:'Post Sharing'\r\n\t\t };\r\n\r\n\t function showFBResult(eventData) {\r\n\t \tif (eventData.success) {\r\n\t \t\t alert('in succes');\r\n\t \t} else {\r\n\t\t\t\tif (eventData.error) {\r\n\t\t\t\t\talert(eventData.error);\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t var fb = require('facebook');\r\n\t\tfb.appid = \"xxxxxxxxxxxxxxxx\";\r\n\t\tfb.permissions = ['publish_stream'];\r\n\t\tfb.forceDialogAuth = true;\r\n\t\tif (!fb.loggedIn) {\r\n\t\t fb.authorize();\r\n\t\t}else{\r\n\t \t\tfb.requestWithGraphPath('me/feed', data, 'POST', showFBResult);\r\n\t\t}\r\n\t\t\r\n\t\tfb.addEventListener('login', function(e){\r\n\t\t\t\tif(e.success){\r\n\t\t\t\t \tfb.requestWithGraphPath('me/feed', data, 'POST', showFBResult);\r\n\t\t\t\t} else if (e.error) {\r\n\t\t\t\t\talert(e.error);\r\n\t\t\t\t}\r\n\t\t});", "attachment": [ { "id": "50587", "filename": "screen1.png", "author": { "name": "shubham10", "key": "shubham10", "displayName": "shubham mishra", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-20T09:36:18.000+0000", "size": 37798, "mimeType": "image/png" } ], "flagged": false, "summary": "FB Login and Sharing not working proper.", "creator": { "name": "shubham10", "key": "shubham10", "displayName": "shubham mishra", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "shubham10", "key": "shubham10", "displayName": "shubham mishra", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 3.2.3.201404181442\r\n\r\nTitanium SDK: 3.2.3 GA\r\n\r\nFacebook SDK: 3.1.1 ", "comment": { "comments": [ { "id": "360344", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nOn latest Ti SDK version FB login and sharing is working as expected. Please try the following code with the latest version of the SDK\r\n\r\n*Testing Environment:*\r\nCommand-Line Interface, version 4.1.2,\r\nFB Module Version: 4.0.5,\r\nTi SDK: 4.1.0,\r\niOS Version: v8.4,\r\nStudio Version: 4.1.1\r\n\r\n*Test Code*\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white',\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar share = Ti.UI.createButton({\r\n\ttitle : 'Share',\r\n\theight : 100,\r\n\twidth : 100,\r\n\ttop : 100,\r\n\tcolor : '#000'\r\n});\r\n\r\n// Listen for click events.\r\nshare.addEventListener('click', function() {\r\n\tshareData();\r\n});\r\n\r\nwin.add(share);\r\n\r\nvar fb = require('facebook');\r\nfb.appid = \"APP_ID\";\r\n\r\nfb.addEventListener('login', function(e) {\r\n\tif (e.success) {\r\n\t\talert('Logged in');\r\n\r\n\t}\r\n});\r\nfb.addEventListener('logout', function(e) {\r\n\talert('Logged out');\r\n});\r\n\r\nwin.add(fb.createLoginButton({\r\n\ttop : 50,\r\n\tstyle : fb.BUTTON_STYLE_WIDE\r\n}));\r\n\r\nvar data = {\r\n\tmessage : \"Trying out FB Graph API and it's fun!\"\r\n};\r\n\r\nfunction shareData() {\r\n\tfb.requestNewPublishPermissions(['publish_actions'], fb.AUDIENCE_FRIENDS, function(e) {\r\n\t\tif (e.success) {\r\n\t\t\tfb.requestWithGraphPath('me/feed', data, \"POST\", function(e) {\r\n\t\t\t\tif (e.success) {\r\n\t\t\t\t\talert(\"Success! From FB: \" + e.result);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (e.error) {\r\n\t\t\t\t\t\talert(e.error);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\talert(\"Unkown result\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tTi.API.debug('Failed authorization due to: ' + e.error);\r\n\t\t}\r\n\t});\r\n\r\n}\r\n\r\nwin.open();\r\n\r\n{code}\r\n{code:title=tiapp.xml}\r\n \r\n \r\n \r\n \r\n CFBundleURLTypes\r\n \r\n \r\n CFBundleURLName\r\n \r\n APP_ID\r\n CFBundleURLSchemes\r\n \r\n \r\n fbFACEBOOK_APP_ID\r\n \r\n \r\n \r\n FacebookAppID\r\n \r\n FACEBOOK_APP_ID\r\n FacebookDisplayName\r\n \r\n FACEBOOK_APP_NAME\r\n \r\n \r\n \r\n \r\n{code}\r\n\r\nThanks.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-19T12:08:26.000+0000", "updated": "2015-09-15T04:04:48.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }