[TIMOB-2645] iPhone: Facebook offline_access state
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:59:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 |
Components | iOS |
Labels | facebook, ios, release-1.6.0 |
Reporter | Alan Leard |
Assignee | Blain Hamon |
Created | 2011-04-15T03:25:44.000+0000 |
Updated | 2011-04-17T01:59:42.000+0000 |
Description
Titanium.Facebook.hasPermission("offline_access")) seems to always return false.
Titanium.Facebook.requestPermission("offline_access",function(evt) does not close window after success.
b1.addEventListener('click', function()
{
if (Titanium.Facebook.isLoggedIn()==false)
{
Ti.UI.createAlertDialog({title:'Facebook', message:'Login before requesting acces'}).show();
return;
}
Ti.API.info('Facebook offline_access permission ' + Titanium.Facebook.hasPermission("offline_access"));
if (!Titanium.Facebook.hasPermission("offline_access"))
{
Titanium.Facebook.requestPermission("offline_access",function(evt)
{
if (evt.success)
{
Ti.API.info('Facebook offline_access permission request result' + Titanium.Facebook.hasPermission("offline_access"));
}
});
}
else
{
Ti.API.info('Facebook offline_access permission request result' + Titanium.Facebook.hasPermission("offline_access"));
}
});
hasPermission doesn't work because they forgot offline_access in their fql select statement. You can
make your own FQL call by doing the following:
Titanium.Facebook.query('SELECT ' + permission + ' FROM permissions WHERE uid = ' + Titanium.Facebook.userId, callback);
Call it with "var permission = 'offline_access';
Callback is a call back function that accepts 1 parameter (result object).
However I didn't find a work around for closing the window.
Possibly invalidated by the new FB implementation?
Querying
offline_access
via YQL in 1.6.0GM works. Ticket was probably invalid to begin with.