{ "id": "162814", "key": "AC-4391", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2016-08-28T16:37:19.000+0000", "created": "2016-08-25T06:03:44.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-08-28T16:37:20.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 using authorize function from Facebook module. In the past once I authorized with Facebook then the next time the app ist started newly I got loggedIn true or EventListener('login') was fired. Now this is not happening any more. Since my app code is calling then authorize again it always jumps to Facebook screen saying that the app is already authorized.\r\n\r\n{code:javascript}\r\n exports.facebook = require('facebook');\r\n exports.facebook.permissions = ['email','user_friends'];\r\n\r\n exports.facebookLogin=function() {\r\n\t exports.facebook.addEventListener('login', faceBookLoginEvent);\t\r\n\t exports.facebook.initialize();\t\t\t\r\n\t exports.facebook.authorize();\t\t\r\n };\t\r\n{code}\r\n\r\nThis part always ends in calling facebookLogin, even after it is authorized once. \r\n\r\n\r\n{code:javascript}\r\n\t\tif (exports.facebook.loggedIn) {\r\n\t\t\tfacebookLoggedIn();\r\n\t\t} else {\r\n\t\t\texports.facebookLogin();\r\n\t\t}\r\n{code}", "attachment": [], "flagged": false, "summary": "Facebook module loggedIn never true", "creator": { "name": "mraalex", "key": "mraalex", "displayName": "Alexander Rieger", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "mraalex", "key": "mraalex", "displayName": "Alexander Rieger", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "394575", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The code-style with all those {{exports}} statements causes problems with your application logic. I just verified that the loggedIn property works well when being called on a regular ti.facebook instance (e.g. {{var fb = require(\"facebook);}}). Ensure that your scope is correct and only use {{exports}} if you want something to be accessible from other components / controllers.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-28T16:37:20.000+0000", "updated": "2016-08-28T16:37:20.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }