-
19 Apr 2012 3:38 AM #1
Unanswered: Twitter Hashtag list
Unanswered: Twitter Hashtag list
Good morning,
I'm trying to write a very basic hashtag list from Twitter, including the username and the text itself.
Let's say that my query is "sencha".
So my code is:
But nothing happens. What could I be doing wrong?Code:var modeloTwitter = Ext.define("modeloTwitter", { extend: 'Ext.data.Model', config: { fields: [ {name: "id", type: "int"}, {name: "text", type: "string"}, {name: "from_user", type: "string"}, {name: "profile_image_url", type: "string"}, {name: "created_at", type: "string"}, {name: "metadata"}, {name: 'search_id'} ] } }); var storeTwitter = Ext.create('Ext.data.Store', { storeId: "storeTwitter", model: "modeloTwitter", proxy: { type: 'jsonp', autoLoad: true, url: 'http://search.twitter.com/search.json?q=Sencha', extraParams: { result_type: 'mixed' }, reader: { type: 'json', rootProperty: 'results' }, }, }); var viewtwitter = Ext.define("abril16.view.Twitter", { extend: 'Ext.Panel', config: { fullscreen: true, items: [{ xtype: 'list', store: storeTwitter, itemTpl: '<b>{from_user}</b>: {text}' }]}});
Thank you thank you thank you in advance.
-
19 Apr 2012 7:39 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3155
Try this (change in red)
Code:Ext.define('abril16.view.Twitter', { extend : 'Ext.Panel', xtype : 'twitterlist', config : { fullscreen : true, layout : 'fit', items : [ { xtype : 'list', store : storeTwitter, itemTpl : '<b>{from_user}</b>: {text}' } ] } });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Apr 2012 8:01 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3155
Are you loading the store? I see you have autoLoad but it's within the proxy config, should be a config of the store.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Apr 2012 8:03 AM #4
-
19 Apr 2012 8:11 AM #5
Argh, it was actually the Autoload thing!!
Sorry for bothering you with this, Mitchell. And thank you so much.


Reply With Quote