how to get to the print out the text feild from the search twitter json api

tighter_ass

New Member
I am trying to use twitter json feed to first get all the texts without replies.Then i am trying to get all the texts with only the replies to the first tweet.I was able to get all the feeds without the reply, but i cannot get all the replies to that tweet. so for the first part (to get tweets posted on my profile) i am using simple user_timeline api with replies turned off. Second part(get the replies only to that tweet) I am using the search api to loop through the tweet id i get form the first part to the second part. Which some reason i cannot seems to get it to work, from the Json. I am having hard time looping through the search json file to get to the text field.I need to get to the value of "Text" from ["results"]["value"];I know this code, might not be efficient, but it doesn't matter, as long as i get the data.\[code\] var urlworeply='https://api.twitter.com/1/statuses/user_timeline/Resilience_Proj.json?exclude_replies=1&include_rts=false&count=25&callback=?'; var urlwreply='https://api.twitter.com/1/statuses/user_timeline/Resilience_Proj.json?exclude_replies=-1&include_rts=false&count=25&callback=?'; var urlkywrd = 'http://search.twitter.com/search.json?q=resilience&rpp=25&include_entities=false&result_type=mixed&callback=?'; $.getJSON(urlworeply, function(data){ $.each(data, function(i, tweet){ tweets = tweet.text; getId= tweet.id; $('#newsfeed').append('<div class = "feedPost"><p class = "postText"><a id="tweetli" >' + tweet.text + '</a></p><div class = "buttons"><a class="supportButton" href="http://stackoverflow.com/questions/15539967/#"><p class="buttonText">SUPPORT</p></a><a class="commentButton" href='http://stackoverflow.com/questions/15539967/+'><p class="buttonText">COMMENT</p></a></div></div>'); $.getJSON('https://api.twitter.com/1/related_results/show/'+getId+'.json?include_entities=1&callback=?', function(stuff){ var tweeting = stuff['results']['value']; $.each(tweeting, function(j, replytweet){ replytweets = replytweet['text']; alert(replytweets); }); }) }); });\[/code\]
 
Back
Top