使用钛合金的twitter个人资料图像问题

使用钛合金的twitter个人资料图像问题,twitter,titanium-mobile,Twitter,Titanium Mobile,我是钛的新手,我正在用钛学习JSon解析。我正在访问特定屏幕名称的推文以及他/她的个人资料图片。它可以很好地关注推文,但没有显示推文的个人资料图片 我的Tweet.js文件是: // Create variable "win" to refer to current window var win = Titanium.UI.currentWindow; // Function loadTweets() function loadTweets() { // Empty array "ro

我是钛的新手,我正在用钛学习JSon解析。我正在访问特定屏幕名称的推文以及他/她的个人资料图片。它可以很好地关注推文,但没有显示推文的个人资料图片

我的Tweet.js文件是:

 // Create variable "win" to refer to current window
 var win = Titanium.UI.currentWindow;
 // Function loadTweets()
 function loadTweets()
 {
// Empty array "rowData" for our tableview
var rowData = [];
var avatar;
// Create our HTTP Client and name it "loader"
var loader = Titanium.Network.createHTTPClient();
// Sets the HTTP request method, and the URL to get data from
loader.open("GET","http://api.twitter.com/1/statuses/user_timeline.json?screen_name=SenchaTouch");
// Runs the function when the data is ready for us to process
loader.onload = function() 
{
    var tweets = eval('('+this.responseText+')');
    alert(tweets);
    for (var i = 0; i < tweets.length; i++)
    {
        var tweet = tweets[i].text; // The tweet message
        var user = tweets[i].user.screen_name; // The screen name of the user
        avatar = tweets[i].user.profile_image_url; // The profile image
        // Create a row and set its height to auto
        var row = Titanium.UI.createTableViewRow({height:'auto'});

        // Create the view that will contain the text and avatar
        var post_view = Titanium.UI.createView({
            height:'auto', 
            layout:'vertical',
            top:5,
            right:5,
            bottom:5,
            left:5
        });
        // Create image view to hold profile pic
        var av_image = Titanium.UI.createImageView({
            url:'KS_nav_ui.png', // the image for the image view
            top:0,
            left:0,
            height:48,
            width:48
        });
        post_view.add(av_image);
        // Create the label to hold the screen name
        var user_lbl = Titanium.UI.createLabel({
            text:user,
            left:54,
            width:120,
            top:-48,
            bottom:2,
            height:16,
            textAlign:'left',
            color:'#444444',
            font:{fontFamily:'Trebuchet MS',fontSize:14,fontWeight:'bold'}
        });
        post_view.add(user_lbl);
        // Create the label to hold the tweet message
        var tweet_lbl = Titanium.UI.createLabel({
            text:tweet,
            left:54,
            top:0,
            bottom:2,
            height:'auto',
            width:236,
            textAlign:'left',
            font:{fontSize:14}
        });
        post_view.add(tweet_lbl);
        // Add the post view to the row
        row.add(post_view);
        // Give each row a class name
        row.className = "item"+i;
        // Add row to the rowData array
        rowData[i] = row;
    }
    // Create the table view and set its data source to "rowData" array
    var tableView = Titanium.UI.createTableView({data:rowData});
    //Add the table view to the window
    win.add(tableView);
};
// Send the HTTP request
loader.send();
   }
   loadTweets();
//创建变量“win”以引用当前窗口
var win=tianium.UI.currentWindow;
//函数loadTweets()
函数loadTweets()
{
//tableview的空数组“rowData”
var rowData=[];
虚拟化身;
//创建HTTP客户端并将其命名为“loader”
var loader=Titanium.Network.createHTTPClient();
//设置HTTP请求方法和从中获取数据的URL
loader.open(“GET”http://api.twitter.com/1/statuses/user_timeline.json?screen_name=SenchaTouch");
//当数据准备好供我们处理时运行函数
loader.onload=函数()
{
var tweets=eval(“(“+this.responseText+”)”);
警报(推特);
对于(var i=0;i
//有人能找出缺陷吗??任何帮助都将不胜感激。
提前感谢:)终于找到了。。问题出在代码中。我只是在图像视图中使用url属性,而不是图像属性。将image属性替换为url属性就可以了

  url: avatar, // It should not be used .. It is not working 
  image: avatar, // It is working very well..