[TIMOB-2734] android facebook query fails after login event is fired.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-07T22:50:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, facebook |
Reporter | Matt Schmulen |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:28:04.000+0000 |
Updated | 2017-06-07T22:50:05.000+0000 |
Description
Android facebbook query fails after login event is fired.
If the device has an active facebook session ( after first login )
http://developer.appcelerator.com/helpdesk/view/62821">http://developer.appcelerator.com/helpdesk/view/62821
function query_all_friends()
{
Ti.API.info('Query all friends of '+Titanium.Facebook.userId);
var query = "SELECT uid,name,pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = " + Titanium.Facebook.userId + ")";
Titanium.Facebook.query(query, function(r)
{
Ti.API.info('Query recieved for '+Titanium.Facebook.userId);
var c = 0;
var data = [];
for (c=0;c<r.data.length;c++)
{
var row = r.data[c];
data.push({className:'friends', title:row.name, chosen_name:row.name, leftImage:row.pic_square, uid:row.uid, chosen_pic:row.pic_square, selectedColor:'#ff6600'});
}//end if iphone
var tableview = Titanium.UI.createTableView({ data:data, top: '60', height: 286, filterAttribute:'chosen_name' });
tableview.addEventListener('click', function(e) { Ti.API.info('rowClicked: ' + e.row.chosen_name ); });
win.add(tableview);
});
}//end query_all_friends
Ti.Facebook.addEventListener('login', function(e)
{
query_all_friends();
});//end
Closing ticket due to time passed.