{ "id": "63277", "key": "TIMOB-2645", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:42.000+0000", "created": "2011-04-15T03:25:44.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "facebook", "ios", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:42.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Titanium.Facebook.hasPermission(\"offline_access\")) seems to\nalways return false.

\n

\nTitanium.Facebook.requestPermission(\"offline_access\",function(evt)\ndoes not close window after success.

\n
\nb1.addEventListener('click', function()\n{\n    if (Titanium.Facebook.isLoggedIn()==false)\n    {\n        Ti.UI.createAlertDialog({title:'Facebook', message:'Login before requesting acces'}).show();\n        return;\n    }\n    Ti.API.info('Facebook offline_access permission ' + Titanium.Facebook.hasPermission(\"offline_access\"));\n    if (!Titanium.Facebook.hasPermission(\"offline_access\"))\n    {\n        Titanium.Facebook.requestPermission(\"offline_access\",function(evt)\n        {\n            if (evt.success)\n            {\n                Ti.API.info('Facebook offline_access permission request result' + Titanium.Facebook.hasPermission(\"offline_access\"));\n            }\n        });\n    }\n    else\n    {\n        Ti.API.info('Facebook offline_access permission request result' + Titanium.Facebook.hasPermission(\"offline_access\"));\n    }\n    \n});\n
{html}", "attachment": [], "flagged": false, "summary": "iPhone: Facebook offline_access state", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129070", "author": { "name": "cfox", "key": "cfox", "displayName": "cfox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

hasPermission doesn't work because they forgot offline_access in\ntheir fql select statement. You can
\nmake your own FQL call by doing the following:

\n

Titanium.Facebook.query('SELECT ' + permission + ' FROM\npermissions WHERE uid = ' + Titanium.Facebook.userId,\ncallback);

\n

Call it with \"var permission = 'offline_access';
\nCallback is a call back function that accepts 1 parameter (result\nobject).

\n

However I didn't find a work around for closing the window.

{html}", "updateAuthor": { "name": "cfox", "key": "cfox", "displayName": "cfox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:25:44.000+0000", "updated": "2011-04-15T03:25:44.000+0000" }, { "id": "129071", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Possibly invalidated by the new FB implementation?

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:25:44.000+0000", "updated": "2011-04-15T03:25:44.000+0000" }, { "id": "129072", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Querying offline_access via YQL in 1.6.0GM works.\nTicket was probably invalid to begin with.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:25:45.000+0000", "updated": "2011-04-15T03:25:45.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }