Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9273215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:03:32+00:00 2026-06-18T16:03:32+00:00

I am newbie to titanium, I am learning JSon Parsing with titanium. I am

  • 0

I am newbie to titanium, I am learning JSon Parsing with titanium. I am accessing tweets for a specific screen name along with his/her profile picture. It is working well as concern to tweets but not showing the profile picture of that tweet.

My Tweet.js file is :

 // 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();

// Can any find out the flaw ?? Any help would be appreciated.
Thanking in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:03:33+00:00Added an answer on June 18, 2026 at 4:03 pm

    At last found it .. The problem was in code. I just use url property in the image view instead of image property. Replacing the image property with that of url has done the trick.

      url: avatar, // It should not be used .. It is not working 
      image: avatar, // It is working very well..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie in appcelerator.titanium. I started development from today onwards. My problem is,
Newbie :) I am trying to create a picture w/ description portfolio. It works
I'm newbie to Titanium. I had created an application to login to the API
I have a newbie question: A simple button I've created in Titanium for iPhone
I am newbie to javascript.I am developing mobile apps using Titanium studio. My question
Newbie in testing. I generated a test case using Selenium, and then exported it
newbie here, so thanks in advance for help! I have a Wordpress site with
Newbie jquery: does the .css() function alter css properties of an element if the
Newbie question... The objective: I intend to have an HTML text input field as
Newbie question: I just installed VisualSVN Server and created a repository. I noticed that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.