[TIMOB-2056] Android: Second launch of app keeps Facebook session logged in but FB Connect dialog shows empty
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T03:09:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Backlog |
Components | Android |
Labels | android, defect, facebook |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:09:10.000+0000 |
Updated | 2017-03-02T19:25:40.000+0000 |
Description
app.js:
/*global Ti, Titanium, alert, JSON */
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#fff',
exitOnClose: true
});
var fbButton = Titanium.Facebook.createLoginButton({
'style':'wide',
'apikey':'9494e611f2a93b8d7bfcdfa8cefdaf9f',
'sessionProxy':'http://api.appcelerator.net/p/fbconnect/',
bottom:10
});
win.add(fbButton);
var status = Ti.UI.createButton({
title:'Publish Status', width:200, height:40, top:60
});
win.add(status);
status.addEventListener('click', function()
{
if (!Titanium.Facebook.isLoggedIn())
{
Ti.UI.createAlertDialog({title:'Facebook', message:'Login before publishing to your stream'}).show();
return;
}
Titanium.Facebook.publishStream("Set your status",null,null,function(r)
{
if (r.success)
{
Ti.UI.createAlertDialog({title:'Facebook', message:'Your status was published'}).show();
}
else
{
Ti.UI.createAlertDialog({title:'Facebook', message:'You canceled, or there was an error'}).show();
}
});
});
win.open();
Steps to reproduce:
-
Launch this app.js.
-
Use the "Connect with Facebook" button to login to Facebook.
-
After you have successfully logged in, go back to Ti Developer and re-launch the application. (You don't need to click the "Publish Status" button at all in this round.
-
When the application re-launches, you should see that you are still logged into Facebook (the blue Facebook button will say "logout" instead of "Connect with Facebook" -- i.e., you are still logged in.)
-
Now click the "Publish Status" button. An empty Facebook Connect view will show up instead of the expected view which should show you fields in which to type and submit your status.
Attachments
File | Date | Size |
---|---|---|
2056_1_4_x.diff | 2011-04-15T03:09:11.000+0000 | 3993 |