Description
Alloy social builtin for twitter when used in the app it does not allow to close the loading popup after login.
Test case
var social = require('alloy/social').create({
consumerSecret: '',
consumerKey: ''
});
// If not authorized, get authorization from the user
if(!social.isAuthorized()) {
social.authorize();
}
// Post a message
// Setup both callbacks for confirmation
social.share({
message: "Salut, Monde!",
success: function(e) {alert('Success!')},
error: function(e) {alert('Error!')}
});
// Deauthorize the application
social.deauthorize();
Please see the attached screenshot for the issue.
Also seeing this issue. Ti 3.1.1
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. The example and documentation should really make this more clear. If 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.
Hope that helps... Dave
Updated the docs to clarify. https://github.com/appcelerator/alloy/pull/345