Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • Videos
  • Most Popular
  • Top Categories
  • Books
  • About Dave
  • Ask Me
  • > Donate <
  • Home
  • Twitter Help
  • Add a Twitter “People Search” Box to my Site?

Add a Twitter “People Search” Box to my Site?

July 21, 2017 / Dave Taylor / Twitter Help / No Comments

I write a lot about Twitter and how to work with it and would love to be able to add a people search box directly on my own Web page. Is that even possible? If so, what’s the HTML I’d need?

If it’s somewhere on the World Wide Web, it’s something you can duplicate on your own page or Web site. The question is really more about how much work you want to go through to accomplish a specific task! 🙂

In terms of what you ask about the Twitter search box and its category-specific searches, the answer is that yes, you can duplicate exactly that search on your own Web page, but it is going to involve a few steps. What we’ll need to do is reverse engineer the Twitter search system itself. Don’t panic, though. That just means we need to do a search, then analyze exactly what transpires so it can be duplicated.

To start, let’s jump over to Twitter and check out the search box itself. It’s pretty straightforward:

twitter web page search box

Reverse engineering is about doing something then seeing what happened, however, so let’s do an actual search. I’m going to search for “john” by typing in the name and pressing Return (as you have figured out, if you click on the blue “Tweet” button you get a window to pop up, letting you compose your next tweet. Oops)

The results show all the various categories:

twitter search result categories

Lots of possibilities, but it’s people you want, so it’s “People” you should click on. Now you’ll have a bunch of what I call “rolodex cards” for different Twitter accounts that match the search parameters:

twitter search for people 'john'

I gotta say, nice job Mr. Shahidi with the @john Twitter handle. That’s a keeper, for sure.

Stay focused, though! What we want is in the Web browser address bar, the exact URL that Twitter used for this particular search:

twitter search url

Because we can see the parameters, we can safely conclude this is what’s known as a “get” search, something that’s important when we build the HTML needed for our duplicate form. Let’s unwrap it all:

  • f=users
  • vertical=news
  • q=john

These can be converted into a more HTML-esque format like this:

  • name=”f” value=”users”
  • name=”vertical” value=”news”
  • name=”q” value=”john”

Add to that these two:

  • action=”https://twitter.com/search”
  • method=”get”

and we have everything we need to duplicate the search box as a FORM for your Web site. Here’s my first cut at it:

<form method=”get” action=”https://twitter.com/search”>
<input type=”hidden” name=”f” value=”users” />
<input type=”hidden” name=”vertical” value=”news” />
<input type=”text” name=”q” maxwidth=”40″ />
</form>

Let’s see how that formats and whether it works:

Try it. I’ve addded a target=”_blank” so the results pop up in a new window.

Works great, doesn’t it? Not too hard at all, this reverse engineering thing. Now, let’s add some CSS pretty so it’s a bit more attractive:

<form method=”get” action=”https://twitter.com/search” target=”_blank”>
<input type=”hidden” name=”f” value=”users” />
<input type=”hidden” name=”vertical” value=”news” />
<input type=”text” name=”q” maxlength=”40″
style=”font-size:125%;border-radius:20px;background-color:#DDF;” />
</form>

The result:

So that’s it. Just copy and paste the above code into the raw HTML of your Web page and you’ve just added a Twitter people search feature to your site. Nicely done!

And while we’re talking about Twitter, I invite you to follow me, @DaveTaylor on Twitter and check out our huge archive of Twitter help here on the site too.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
html hacking, reverse engineer, reverse engineering, search hacks, search twitter, twitter people search, twitter search, web hacking

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • How Can I Prevent Remote Access to my Windows PC?
  • The Easy Way to Add Contacts to my New Android Phone?
  • How Can I Hide or Report An Offensive Advert on Facebook?
  • Switch “Paste” & “Paste and Match Style” Keyboard Shortcuts on MacOS?
  • How Can I Easily Create a QR Code For My Web Page?

On Our YouTube Channel

AUKEY Omnia 100W + Minima 20W Power Chargers -- DEMO & REVIEW

Roborock S6 MaxV Robot Vacuum Cleaner -- DEMO & REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Amazon Echo & Kindle Help (79)
  • Amazon, eBay, and Online Shopping Help, (157)
  • Android Help (160)
  • Apple Watch Help (49)
  • Articles, Tutorials, and Reviews (327)
  • Business Advice (192)
  • Computer & Internet Basics (720)
  • d) None of the Above (160)
  • Facebook Help (365)
  • Google, Chrome & Gmail Help (157)
  • HTML & Web Page Design (244)
  • Instagram Help (44)
  • iPad Help (137)
  • iPhone & iOS Help (571)
  • iPod & MP3 Player Help (173)
  • LinkedIn Help (79)
  • Linux Help (149)
  • Linux Shell Script Programming (86)
  • Mac & MacOS Help (833)
  • Most Popular (10)
  • Outlook & Office 365 Help (10)
  • PayPal Help (68)
  • Pinterest Help (53)
  • Reddit Help (12)
  • SEO & Marketing (80)
  • Spam, Scams & Security (84)
  • Trade Show News & Updates (23)
  • Twitter Help (212)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows 10 Help (831)
  • Wordpress Help (201)
  • Writing and Publishing (72)
  • YouTube Help (43)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (42)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2020 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy