[TIMOB-2771] Android: Facebook publish stream does clear/reset its data
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M04 |
Components | Android |
Labels | android, defect, enterprise, facebook, regression, release-1.6.0, reported-1.5.1, rplist |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:29:05.000+0000 |
Updated | 2011-04-17T02:00:02.000+0000 |
Description
From Fred:
Login and tap 'Post 01'. Rather than submitting, close and tap 'Post 02' - It's using the same data from the first publish, even though the data is different in source. App data has to be completely cleared before this stops, but it continues to use the same publish data from the first publish request.
app.js:
var win = Ti.UI.createWindow();
var fbBtn = Ti.Facebook.createLoginButton({
'style':'wide',
'apikey':'9494e611f2a93b8d7bfcdfa8cefdaf9f',
'sessionProxy':'http://api.appcelerator.net/p/fbconnect/',
bottom:10
});
var post01Btn = Ti.UI.createButton({ title:'Post 01', left:10, right:10, top:10, height:30 });
var post02Btn = Ti.UI.createButton({ title:'Post 02', left:10, right:10, top:50, height:30 });
post01Btn.addEventListener('click', function(e) {
if (Ti.Facebook.isLoggedIn()) {
var data = {
"name": "Sample Title 01",
"href": "http://google.com",
"description": "Sample Description 01",
"caption": "Sent via a test Appcelerator App."
};
Ti.Facebook.publishStream("POST NUMBER 01", data, null, function(r) {
if (r.success) {
alert('Posted.');
} else {
alert('Not Posted.');
}
});
}
});
post02Btn.addEventListener('click', function(e) {
if (Ti.Facebook.isLoggedIn()) {
var data = {
"name": "Sample Title 02",
"href": "http://google.com",
"description": "Sample Description 02",
"caption": "Sent via a test Appcelerator App."
};
Ti.Facebook.publishStream("POST NUMBER 02", data, null, function(r) {
if (r.success) {
alert('Posted.');
} else {
alert('Not Posted.');
}
});
}
});
win.add(post01Btn);
win.add(post02Btn);
win.add(fbBtn);
win.open();
(from [c1584226b7836da0ed07d1dedc290bcd9dee5b0c]) [#2771 state:fixed-in-qa] Our new remote image cache seems to cache all requests made on Java HttpURLConnection, not just those for images. Facebook dialog to publish stream uses HttpUrlConnection and the same query string (with different post data), and the same cached response was being shown over and over again. Explicitly disable caching on HttpUrlConnection objects used in Facebook module. https://github.com/appcelerator/titanium_mobile/commit/c1584226b7836da0ed07d1dedc290bcd9dee5b0c"> https://github.com/appcelerator/titanium_mobile/commit/c1584226b783...
This bug makes multiple publishing of stream/status updates impossible in the same running FB session under Titanium 1.5.X, therefore I'll also cherry-pick to 1.5.X.
(from [682e79e0d2a24922bfff09c5aa9a87504b3714e8]) [#2771 state:fixed-in-qa] Our new remote image cache seems to cache all requests made on Java HttpURLConnection, not just those for images. Facebook dialog to publish stream uses HttpUrlConnection and the same query string (with different post data), and the same cached response was being shown over and over again. Explicitly disable caching on HttpUrlConnection objects used in Facebook module. https://github.com/appcelerator/titanium_mobile/commit/682e79e0d2a24922bfff09c5aa9a87504b3714e8"> https://github.com/appcelerator/titanium_mobile/commit/682e79e0d2a2...
(from [95363ab6703354bd71d35a7f553c6c3b997a8910]) [#2771] Update KS Facebook 'publish stream' test to include indication that cached responses are not being used. https://github.com/appcelerator/titanium_mobile/commit/95363ab6703354bd71d35a7f553c6c3b997a8910"> https://github.com/appcelerator/titanium_mobile/commit/95363ab67033...
[INFO] Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06) still need to check in 1.5.2
[INFO] Titanium SDK version: 1.5.2 (01/14/11 10:34 8e8e048) 1.6 and 2.2.1