{ "id": "63403", "key": "TIMOB-2771", "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": "11237", "name": "Release 1.6.0 M04", "archived": true, "released": true, "releaseDate": "2011-01-10" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:00:02.000+0000", "created": "2011-04-15T03:29:05.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "enterprise", "facebook", "regression", "release-1.6.0", "reported-1.5.1", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-04-17T02:00:02.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}

From Fred:

\n

Login and tap 'Post 01'. Rather than submitting, close and tap\n'Post 02' - It's using the same data from the first publish, even\nthough the data is different in source. App data has to be\ncompletely cleared before this stops, but it continues to use the\nsame publish data from the first publish request.

\n

app.js:

\n
\nvar win = Ti.UI.createWindow();\nvar fbBtn = Ti.Facebook.createLoginButton({\n    'style':'wide',\n    'apikey':'9494e611f2a93b8d7bfcdfa8cefdaf9f',\n    'sessionProxy':'http://api.appcelerator.net/p/fbconnect/',\n    bottom:10\n});\n\nvar post01Btn = Ti.UI.createButton({ title:'Post 01', left:10, right:10, top:10, height:30 });\nvar post02Btn = Ti.UI.createButton({ title:'Post 02', left:10, right:10, top:50, height:30 });\n\npost01Btn.addEventListener('click', function(e) {\n    if (Ti.Facebook.isLoggedIn()) {\n        var data = {\n            \"name\": \"Sample Title 01\",\n            \"href\": \"http://google.com\",\n            \"description\": \"Sample Description 01\",\n            \"caption\": \"Sent via a test Appcelerator App.\"\n        };\n        \n        Ti.Facebook.publishStream(\"POST NUMBER 01\", data, null, function(r) {                     \n            if (r.success) {\n                alert('Posted.');\n            } else {\n                alert('Not Posted.');\n            }\n        });\n    }\n});\n\npost02Btn.addEventListener('click', function(e) {\n    if (Ti.Facebook.isLoggedIn()) {\n        var data = {\n            \"name\": \"Sample Title 02\",\n            \"href\": \"http://google.com\",\n            \"description\": \"Sample Description 02\",\n            \"caption\": \"Sent via a test Appcelerator App.\"\n        };\n        \n        Ti.Facebook.publishStream(\"POST NUMBER 02\", data, null, function(r) {                     \n            if (r.success) {\n                alert('Posted.');\n            } else {\n                alert('Not Posted.');\n            }\n        });\n    }\n});\n\nwin.add(post01Btn);\nwin.add(post02Btn);\nwin.add(fbBtn);\nwin.open();\n
{html}", "attachment": [], "flagged": false, "summary": "Android: Facebook publish stream does clear/reset its data", "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": "129373", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [c1584226b7836da0ed07d1dedc290bcd9dee5b0c])\n[#2771 state:fixed-in-qa] Our new remote image\ncache seems to cache all requests made on Java HttpURLConnection,\nnot just those for images. Facebook dialog to publish stream uses\nHttpUrlConnection and the same query string (with different post\ndata), and the same cached response was being shown over and over\nagain. Explicitly disable caching on HttpUrlConnection objects used\nin Facebook module. \nhttps://github.com/appcelerator/titanium_mobile/commit/c1584226b783...

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

This bug makes multiple publishing of stream/status updates\nimpossible in the same running FB session under Titanium 1.5.X,\ntherefore I'll also cherry-pick to 1.5.X.

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

(from [682e79e0d2a24922bfff09c5aa9a87504b3714e8])\n[#2771 state:fixed-in-qa] Our new remote image\ncache seems to cache all requests made on Java HttpURLConnection,\nnot just those for images. Facebook dialog to publish stream uses\nHttpUrlConnection and the same query string (with different post\ndata), and the same cached response was being shown over and over\nagain. Explicitly disable caching on HttpUrlConnection objects used\nin Facebook module. \nhttps://github.com/appcelerator/titanium_mobile/commit/682e79e0d2a2...

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

(from [95363ab6703354bd71d35a7f553c6c3b997a8910])\n[#2771] Update KS Facebook 'publish stream' test\nto include indication that cached responses are not being used.\n\nhttps://github.com/appcelerator/titanium_mobile/commit/95363ab67033...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:29:06.000+0000", "updated": "2011-04-15T03:29:06.000+0000" }, { "id": "129377", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.6.0 (01/10/11\n08:25 3452f06) still need to check in 1.5.2

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:29:07.000+0000", "updated": "2011-04-15T03:29:07.000+0000" }, { "id": "129378", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.5.2 (01/14/11\n10:34 8e8e048) 1.6 and 2.2.1

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:29:07.000+0000", "updated": "2011-04-15T03:29:07.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }