{ "id": "62688", "key": "TIMOB-2056", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T03:09:12.000+0000", "created": "2011-04-15T03:09:10.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "facebook" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-02T19:25:40.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

app.js:

\n
\n/*global Ti, Titanium, alert, JSON */\nTitanium.UI.setBackgroundColor('#000');\nvar win = Titanium.UI.createWindow({  \n    title:'Test',\n    backgroundColor:'#fff',\n    exitOnClose: true\n});\n\nvar fbButton = Titanium.Facebook.createLoginButton({\n    'style':'wide',\n    'apikey':'9494e611f2a93b8d7bfcdfa8cefdaf9f',\n    'sessionProxy':'http://api.appcelerator.net/p/fbconnect/',\n    bottom:10\n});\nwin.add(fbButton);\n\nvar status = Ti.UI.createButton({\n    title:'Publish Status', width:200, height:40, top:60\n});\nwin.add(status);\n\nstatus.addEventListener('click', function()\n{\n    if (!Titanium.Facebook.isLoggedIn())\n    {\n        Ti.UI.createAlertDialog({title:'Facebook', message:'Login before publishing to your stream'}).show();\n        return;\n    }\n\n    Titanium.Facebook.publishStream(\"Set your status\",null,null,function(r)\n    {\n        if (r.success)\n        {\n            Ti.UI.createAlertDialog({title:'Facebook', message:'Your status was published'}).show();\n        }\n        else\n        {\n            Ti.UI.createAlertDialog({title:'Facebook', message:'You canceled, or there was an error'}).show();\n        }\n    });\n    \n});\n\nwin.open();\n
\n

Steps to reproduce:

\n
{html}", "attachment": [ { "id": "18092", "filename": "2056_1_4_x.diff", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:09:11.000+0000", "size": 3993, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "Android: Second launch of app keeps Facebook session logged in but FB Connect dialog shows empty", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "127370", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Attached .diff to help with logging. Haven't committed any of\nthis yet.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:09:11.000+0000", "updated": "2011-04-15T03:09:11.000+0000" }, { "id": "127371", "author": { "name": "leoacevedo", "key": "leoacevedo", "displayName": "Leo Acevedo", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I could overcome this problem by erasing the activity cookies in\nFacebookModule.executeLogin.I also unsave the session so that if\nanother user will log in, it will be asked for credentials.

\n

CookieSyncManager.createInstance(activity);
\nCookieSyncManager csm = CookieSyncManager.getInstance();
\nCookieManager cm = CookieManager.getInstance();
\ncm.removeAllCookie();
\ncsm.sync();
\nsession.unsave(activity);

\n

After this I still had a FileNotFoundException when loading\nhttps://graph.facebook.com/me?var=val&...&method=me.\nIt worked for me after commenting out the following line on\nFBRequest.java (method callWithAnyData() )

\n

mParams.put(\"method\", mMethod);

\n

Hope this may be of help

{html}", "updateAuthor": { "name": "leoacevedo", "key": "leoacevedo", "displayName": "Leo Acevedo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:09:12.000+0000", "updated": "2011-04-15T03:09:12.000+0000" }, { "id": "127372", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

With the Titanium 1.6.0 changes to the facebook module, the\nequivalent code for the above test case would now be:

\n
\nTitanium.UI.setBackgroundColor('#000');\nTi.Facebook.appid = \"YOUR FACEBOOK APP ID\";\nvar win = Titanium.UI.createWindow({  \n    title:'Test',\n    backgroundColor:'#fff',\n    exitOnClose: true\n});\n\nvar fbButton = Titanium.Facebook.createLoginButton({\n    'style':'wide',\n    bottom:10\n});\nwin.add(fbButton);\n\nvar status = Ti.UI.createButton({\n    title:'Publish Status', width:200, height:40, top:60\n});\nwin.add(status);\n\nstatus.addEventListener('click', function()\n{\n    if (!Titanium.Facebook.loggedIn)\n    {\n        Ti.UI.createAlertDialog({title:'Facebook', message:'Login before publishing to your stream'}).show();\n        return;\n    }\n    Ti.Facebook.dialog(\"feed\", {},function(){});\n});\n\nwin.open();\n
\n

I cannot re-create the failcase with the new Facebook module, so\nI'll mark this as \"invalid\" (though it was not originally invalid)\nto close it.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:09:12.000+0000", "updated": "2011-04-15T03:09:12.000+0000" }, { "id": "127373", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

@Leo Acevedo: regarding destroying FB sessions, you might be\ninterested in the approached described in #3025.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:09:12.000+0000", "updated": "2011-04-15T03:09:12.000+0000" }, { "id": "127374", "author": { "name": "leoacevedo", "key": "leoacevedo", "displayName": "Leo Acevedo", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

@Bill Dawson: indeed, it would have been great to know this in\nadvance, thanks a lot :)

{html}", "updateAuthor": { "name": "leoacevedo", "key": "leoacevedo", "displayName": "Leo Acevedo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:09:13.000+0000", "updated": "2011-04-15T03:09:13.000+0000" }, { "id": "408456", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closed as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T19:25:40.000+0000", "updated": "2017-03-02T19:25:40.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }