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 4329306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:48:22+00:00 2026-05-21T09:48:22+00:00

Long back I used JSON and was successful to get the hash tag feeds

  • 0

Long back I used JSON and was successful to get the hash tag feeds from twitter and facebook. But presently I am just able to get the feeds but its not being updated constantly that means it not been update dynamically. I guess I need to ajaxify it, but I am not able to do that since I am not aware of ajax. Here is the code which I have used to get the twitter search feeds.

$(document).ready(function() 
   {    
   $("#Enter").click(function(event){ 
var searchTerm = $("#search").val()  ; 

var baseUrl = "http://search.twitter.com/search.json?q=%23";
$.getJSON(baseUrl + searchTerm + "&rpp=1500&callback=?", function(data) 
{
$("#tweets").empty(); 
if(data.results.length < 1) 
  $('#tweets').html("No results JOINEVENTUS"); 
$.each(data.results, function()
{
$('<div align="justify"></div>')
.hide()
.append('<hr> <img src="' + this.profile_image_url + '" width="40px" /> ')
.append('<span><a href="http://www.twitter.com/'
+ this.from_user + '">' + this.from_user 
+ '</a> ' + makeLink(this.text) + '</span>')
.appendTo('#tweets') 
.fadeIn(800); 
});
});
});
});

function makeLink(text) 
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;   
return text.replace(exp,"<a href='$1'>$1</a>"); 
} 
  • 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-05-21T09:48:23+00:00Added an answer on May 21, 2026 at 9:48 am

    The code below should help you. What I’ve done is moved the code which fetches the tweets into a function. This function is then called every X seconds to update the box. When the user enters a new search term and clicks “Enter”, it will reset the timer.

    var fetchSeconds = 30; //Number of seconds between each update
    var timeout; //The variable which holds the timeout
    $(document).ready(function() {    
        $("#Enter").click(function(event){ 
            //Clear old timeout
            clearTimeout(timeout);
            //Fetch initial tweets
            fetchTweets();
        });
    });
    
    function fetchTweets() {
        //Setup to fetch every X seconds
        timeout = setTimeout('fetchTweets()',(fetchSeconds * 1000));
        var searchTerm = $("#search").val(); 
        var baseUrl = "http://search.twitter.com/search.json?q=%23";
        $.getJSON(baseUrl + searchTerm + "&rpp=1500&callback=?", function(data) {
            $("#tweets").empty(); 
            if (data.results.length < 1) {
                $('#tweets').html("No results JOINEVENTUS"); 
            }
            $.each(data.results, function() {
                $('<div align="justify"></div>').hide()
                                                .append('<hr> <img src="' + this.profile_image_url + '" width="40px" /> ')
                                                .append('<span><a href="http://www.twitter.com/'+ this.from_user + '">' + this.from_user + '</a> ' + makeLink(this.text) + '</span>')
                                                .appendTo('#tweets')
                                                .fadeIn(800); 
            });
        });
    }
    
    function makeLink(text) {
        var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;   
        return text.replace(exp,"<a href='$1'>$1</a>"); 
    }
    

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a cms engine that I created not long back, I have used
a long while back when I built my first web application I used sajax
I have used Eclipse for a very long time. It has its problems, but
I'm an MVC fan from way back and used Maverick.Net for my web sites
Long back, android used to have GtalkService that let applications use Gtalk for various
I have first encounter operator overloading in .Net, long back I had used it
I just resumed back to working with C++ after a long time. I am
I'm getting back in to Cocoa development on the Mac after a long stint
I'm looking for a simple way to translate long to String and back in
I have lot of executable that I have compiled (long time back) for many

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.