How to implement twitter search in

In this post,I will show you how to implement twitter search in this project,I am using following things

<a href="" target="_blank">Twitter search Api</a>
<a href="" target="_blank">Jquery</a>
<a href="" target="_blank">Handlebars jquery template</a>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Twitter.aspx.cs" Inherits="Twitter" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
    <style type="text/css">
            width: 600px;
            margin: auto;
            list-style-type: none;
            float: left;
            padding-right: 1em;
            text-decoration: none;
    <script src="" type="text/javascript"></script>
    <script src="Scripts/Handlebars.js" type="text/javascript"></script>
    <script type="text/javascript">
    var Twitter =
             init: function () {
    this.url = "'" + $("#txtSearch").val() + "'&callback=?";
    this.template = $("#template").html();
             fetch: function () {
    var self = this;
                 $.getJSON(this.url, function (data) {
                     self.tweets = $.map(data.results, function (tweet) {
    return {
                             author: tweet.from_user,
                             tweet: tweet.text,
                             thumb: tweet.profile_image_url,
                             url: '' + tweet.from_user + '/status/' + tweet.id_str
             parse: function () {
    var template = Handlebars.compile(this.template);
    var container = $(".tweets");
        $(document).ready(function () {
            $("#btnSearch").click(function () {
    <form id="form1" runat="server">
        <input type="text" id="txtSearch" /><br />
        <input type="button" id="btnSearch" value="Search" />
        <ul class="tweets">
            <script type="text/x-handlebars-template" id="template">
            {{#each this}}
            <img src="{{thumb}}" alt="{{author}}"></img>
            <p><a href="{{url}}"> {{tweet}} </a></p>

You can download the complete source code from below git location

1 comment:

  1. You actually make it seem so easy with your presentation but I find this topic to be really something that I think I would never understand. It seems too complicated and very broad for me. I'm looking forward for your next post, I’ll try to get the hang of it.
    usb drive recovery