Skip to content

Instantly share code, notes, and snippets.

@conspirator
Created September 9, 2010 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conspirator/572028 to your computer and use it in GitHub Desktop.
Save conspirator/572028 to your computer and use it in GitHub Desktop.
Ext.regModel('ListItem', {
fields: [{id: 'string', name: 'text'}]
});
Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function(){
var data = "";
Ext.util.JSONP.request({
url: 'https://graph.facebook.com/me/friends',
params: {
access_token: "///TOKEN GOES HERE\\\"
},
callbackKey: 'callback',
callback: function(data) {
data = data.data;
}
});
var store = new Ext.data.TreeStore({
model: 'ListItem',
proxy: {
type: 'ajax',
reader: {
type: 'tree',
root: 'data'
}
}
});
var nestedList = new Ext.NestedList({
fullscreen: true,
title: 'Friends',
displayField: 'text',
store: store
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment