Created
September 9, 2010 15:37
-
-
Save conspirator/572028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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