{ "id": "116827", "key": "ALOY-736", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" }, { "id": "15904", "description": "2014 Sprint 08", "name": "2014 Sprint 08", "archived": true, "released": true, "releaseDate": "2014-04-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-11-26T02:20:10.000+0000", "created": "2013-07-03T10:41:00.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-noTestNeeded", "supportTeam" ], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-11-26T02:20: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": [ { "id": "13610", "name": "Builtins", "description": "Builtin Javascript libraries" } ], "description": "h2. Description\r\nAlloy social builtin for twitter when used in the app it does not allow to close the loading popup after login.\r\n\r\nh2. Test case\r\n\r\n{code}\r\nvar social = require('alloy/social').create({\r\n consumerSecret: '',\r\n consumerKey: ''\r\n});\r\n\r\n// If not authorized, get authorization from the user\r\nif(!social.isAuthorized()) { \r\n social.authorize();\r\n}\r\n\r\n// Post a message\r\n// Setup both callbacks for confirmation\r\nsocial.share({\r\n message: \"Salut, Monde!\",\r\n success: function(e) {alert('Success!')},\r\n error: function(e) {alert('Error!')}\r\n}); \r\n\r\n// Deauthorize the application\r\nsocial.deauthorize();\r\n{code}\r\n\r\nPlease see the attached screenshot for the issue.", "attachment": [ { "id": "40496", "filename": "Screen Shot 2013-06-28 at 4.40.01 PM.png", "author": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-03T10:41:00.000+0000", "size": 68547, "mimeType": "image/png" } ], "flagged": false, "summary": "Alloy: Twitter builtin does not close loading popup after login", "creator": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "267190", "author": { "name": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also seeing this issue. Ti 3.1.1", "updateAuthor": { "name": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-19T19:59:15.000+0000", "updated": "2013-08-19T19:59:15.000+0000" }, { "id": "268099", "author": { "name": "d4v1d", "key": "d4v1d", "displayName": "David Knell", "active": true, "timeZone": "America/New_York" }, "body": "I had this same issue and was banging my head against the desk trying to figure this out. Then I looked in the social.js file and found the answer. Basically, you should use authorize() *OR* share() in the same code block - *NOT* both. The share() function actually calls authorize itself which opens the authorizeUI AND the loadingUI (which is the screen in your screenshot). Then when you call share(), it calls authorize() again and opens another instance of authorizeUI and loadingUI and the code is not cleaning up both instances.\r\n\r\nThe example and documentation should really make this more clear.\r\n\r\nIf you change your code to the following, your user will still be asked to authenticate, if they are not already, and your problem should be solved.\r\n\r\n{code:javascript}\r\nvar social = require('alloy/social').create({\r\n consumerSecret: '',\r\n consumerKey: ''\r\n});\r\n \r\n// Post a message\r\n// Setup both callbacks for confirmation\r\nsocial.share({\r\n message: \"Salut, Monde!\",\r\n success: function(e) {alert('Success!')},\r\n error: function(e) {alert('Error!')}\r\n}); \r\n\r\n{code}\r\n\r\nHope that helps...\r\n\r\nDave", "updateAuthor": { "name": "d4v1d", "key": "d4v1d", "displayName": "David Knell", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-26T12:06:09.000+0000", "updated": "2013-08-26T12:06:09.000+0000" }, { "id": "296341", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Updated the docs to clarify. https://github.com/appcelerator/alloy/pull/345", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-03-10T18:05:00.000+0000", "updated": "2014-03-10T18:05:00.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }