Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2645] iPhone: Facebook offline_access state

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:42.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0
ComponentsiOS
Labelsfacebook, ios, release-1.6.0
ReporterAlan Leard
AssigneeBlain Hamon
Created2011-04-15T03:25:44.000+0000
Updated2011-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"));
    }
    
});

Comments

  1. cfox 2011-04-15

    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.

  2. Stephen Tramer 2011-04-15

    Possibly invalidated by the new FB implementation?

  3. Stephen Tramer 2011-04-15

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

JSON Source