Jump to content

Twitter Form


maka
 Share

Recommended Posts

Trying to do something online, wondering if it is possible.

(been years since i've done web work)

Lets say you wanted to use a hashtag for local people to be aware of something, say on the roads, any hazards, road closures, big potholes etc, all connected by the hashtag #example

could you build a very simple twitter form that would collect the following:

Nature of Hazard: (drop down box Debris/Incident/Roadworks/other)
Location:
Additional Info:
[SEND]

that would generate a tweet that looked like:

#Example - Debris: High St Anytown. Glass in road from earlier accident

have given consideration to the 140 limit so would have to be mindful of that (maybe limit the text box)

my idea is to then collate the tweets on a web page so people can see local hazards, maybe even location or town being another field on its own and i can prefix the town with a hashtag #Anytown for more visibility.

any help would be appreciated.

only thing I can think of at the moment is a twitter link which simply includes the Hashtag but no format to the information.

Link to comment
Share on other sites

Yes, thanks - like that but then it sends that info to twitter generating a tweet such as

#Example - Debris: High St Anytown. Glass in road from earlier accident

#example being the tag for the scheme the following the info.

I remember with email you can do:

<a href="mailto: [email protected]?subject=BlabBlah/Comments">E-mail Me</a> 

and was wondering if there is a way to do it within the URL (so it would submit much like a share button you see on say bbc news)

or if i would have to use an API or suchlike.

Link to comment
Share on other sites

I have made some adjustments to the form. Turns out you can do it with JavaScript!

https://www.sangahosting.co.uk/policespecials/twitter-example

When you submit the form you will be able to tweet the details that you have entered in the form. You will need to be logged in to your twitter account to post the tweet.

Hope it helps :)

Link to comment
Share on other sites

that does, fantastic. going to try and host it on tumblr first, manual tweets at first then if it is viable then get a website for it :)

  • Like 1
Link to comment
Share on other sites

I saved this form as a bookmark.

Is this now live as I'm getting a bit concerned at some of the tweets;

Saturday 13th July 2013 - 1:12pm (11.98.xxx.xxx)
#ZombieRoadworks - Roadworks: Epsom Downs. Digging up zombies in epsom. -

I dare not post the tweet above that one though! :lol:

Link to comment
Share on other sites

 Share

×
×
  • Create New...