{ "id": "89445", "key": "TIMOB-8512", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2012-04-04T02:08:49.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:29.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h1. Description\r\nIf you ask some Facebook permissions to a user and (s)he accepts, you won't be enabled to ask her/him for a new permission until (s)he disconnect from Facebook.\r\n\r\n\r\nh1. Steps to reproduce\r\nI have attached an 'app.js' file to reproduce the bug:\r\n - check that the permissions asked are: ['email', 'user_birthday'] (see the label at the bottom of the windonw)\r\n - click on the \"Facebook.authorize()\" button to call: Ti.Facebook.authorize()\r\n - accept the permissions requested\r\n - now, click on \"Change permissions\"\r\n - check that the permissions asked are: ['email', 'user_birthday', 'user_likes'] (see the label at the bottom of the windonw)\r\n - click on the \"Facebook.authorize()\" button to call: Ti.Facebook.authorize()\r\n==> the app doesn't ask for the new permission\r\n - click on \"Logout Facebook\"\r\n - click on the \"Facebook.authorize()\" button to call: Ti.Facebook.authorize()\r\n==> the app ask for the new permission\r\n\r\n\r\nThis issue is due to your class [FacebookModule.m|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/FacebookModule.m] at this line:\r\n{code:title=FacebookModule.m|borderStyle=solid}\r\n-(void)authorize:(id)args\r\n{\r\n\tENSURE_UI_THREAD(authorize, args);\r\n\r\n\tVerboseLog(@\"[DEBUG] facebook authorize\");\r\n\r\n\tif ([self isLoggedIn]) // <============== [HERE] ===============\r\n\t{\r\n\t\t// if already authorized, this should do nothing\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (appid==nil)\r\n\t{\r\n\t\t[self throwException:@\"missing appid\" subreason:nil location:CODELOCATION];\r\n\t}\r\n\r\n\t// forget in case it fails\r\n\t[self _unsave];\r\n\r\n\tNSArray *permissions_ = permissions == nil ? [NSArray array] : permissions;\r\n\t[facebook setForceDialog:forceDialogAuth];\r\n\t[facebook authorize:permissions_];\r\n}\r\n{code}", "attachment": [ { "id": "26815", "filename": "app.js", "author": { "name": "knice", "key": "knice", "displayName": "Romain", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-04-04T02:08:49.000+0000", "size": 1609, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: you can' ask new Facebook permission without user logout", "creator": { "name": "knice", "key": "knice", "displayName": "Romain", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "knice", "key": "knice", "displayName": "Romain", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium Mobile for *iOS* 1.8.0.1, 1.8.1, 1.8.2, ...\r\niOS: 5.0\r\nTitanium Studio 1.0.9", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }