Hackathon project regarding Twitter - twitter

I will be attending my first hackathon this upcoming weekend, and plan to create a Twitter-based Chrome extension. Basically, when someone wants to tweet or reply to something, and they click the 'tweet' button, it will open up a pop-up modal that asks them some questions about their tweet (so as to encourage them to be mindful about what they post). Within the modal, there will be a button that then publishes the tweet.
So, to sum it up, my modal will be an intermediary in the process of posting a tweet.
What technologies will be useful in implementing this? Specifically, how can I implement the feature in which someone clicks the tweet/reply button, and it opens up my web app's modal on the same screen? Correct me if I am wrong, but I think this is called event capture? Does this have anything to do with Web Intents?
Thanks!

I have done similar things on other sites. A high level overview of what you should try doing:
Find out how twitter sends tweets, the "tweet" button has a "js-send-tweets" class, I would start by investigating that. They probably have a piece of js listening to the button press.
Once you figured it out you can override that function by injecting your own script to the page after twitter's. This way when you press tweet your function will execute.
You should write your own logic in there then add twitter's function logic too which would conditionally execute based on the user's action.

Related

Create interactive HTML banners for Google AdWords using Google web designer

after searching a lot decided to post question here hoping to get any solution.
What I have to do:
I have to make interactive banners for Google Adwords platform, shortly to describe it consists of two parts, on the 1st part appears spidometer and alarms signs within green button where user has to click and after clicking there is 2nd part where is displayed text and only than user should be redirected to the site. Here is a non accurate example what we have done using Google web designer: http://example.ge/test/
Problem:
When uploading this banner in Google Adwords it links whole banner 1st and 2nd step with destination URL and the main idea is lost to send customer to the landing page after he sees 2nd slide. We need to link only 2nd step after clicking green button appeared text.
If you have any questions for more detailes I would be more than happy to provide.
Do you know any solution? Thanks in advance.
I'm not sure about Google Web Designer, but if you use the extiapi.js functionality, this should be possible.
Just include it in your creative:
<script type="text/javascript" src="https://tpc.googlesyndication.com/pagead/gadgets/html5/api/exitapi.js"> </script>
And then call the ExitApi.exit() function on the second click.

Display notification to everyone viewing website

Im working on a website and I am not sure how to go about a feature I want to implement.
I have some user interactions and when they do something I want to display a message on the website (like a toast in android) to anyone who is currently viewing the website.
Im not sure where to start with this....Ive tried searching for something but havent been able to find anything that is what I want...any help pointing me in the direction as to what I should be looking into would be helpful
On sites where you want to show notification use ajax call every second for example, which check if there is some notification to show, if so then write notification using javascript to the page

Gem for creating a left/right scrollable notification viewer for web app?

I'm new to Ruby on Rails so please bear with me.
I'm creating a web app for users to trade cards and would like to include in the user's home page a notification section that shows relevant alerts for the user based on possible trade matches and other things like new messages. The functionality would require alerts to be generated based on certain triggers (userB accepts trade, trade is proposed to userA, userB messages userA, and possibly even incorporate sponsored posts). This will basically function like the "notification center" on iOS.
I've made a quick mockup: http://i.imgur.com/hQ3Fc.jpg (or if that's too big --> http://imgur.com/hQ3Fc) -- wouldn't let me embed image because I'm new :(
So the idea is the view will probably have 5-15 alerts at any given time (give or take) and can scroll through them using those left/right arrows. The alerts will be a basic message with a link to the relevant page, or for something like a trade rating have the message "open" to fill the viewer and show the necessary functionality.
Hopefully I explained this okay. Anyone know anything out there that might make building this easier? Please let me know if there is any info I missed in asking this?
Not sure I get exactly what your wanting to do but if I understand correctly this may help. I have used swipe.js it is easy to use, should get you started on a swipeable/scrollable interface.

Google Analytics Link Tracking

OK, so I've set up a website where the content is split into modals that are hidden. There are links on the page that when clicked on, the relevant modal appears. I want to be able to track the links being clicked on so I can see what content is being viewed by users. Ideally I want the data to appear as fake pageviews. I know this used to be possible but not sure how to do it nowadays.
I can't seem to find any decent up to date documentation online for how to do this. Can anyone shed some light?
Once you have the Analytics initialized for asynchrounous, just call
_gaq.push(['_trackPageview', 'FAKE_URL']);
This should work and will not slow down your page load. You might want to consider using "events" rather than fake page views; it's also quite simple
_gaq.push(['_trackEvent', "EVENT NAME", "PARAMETER"]);
See Google's Documentation for more info.

Is there a method to programmatically add a website shortcut to the iPhone?

I am looking to add a button to my website which easily allows people to turn the site into a shortcut on their phone.
I'm looking to automate the actions shown here: http://www.simpleleapsoftware.com/blog/how-to-create-shortcuts-iphone-ipod-touch-115 for my users, specifically for my website.
I'm open to any alternative ideas of making the process of adding a link to my website less painful, if putting a button on the site is not the easiest way of doing things.
I know this isn't a very helpful answer, but I seriously, seriously doubt this is possible. If Apple were to allow such an action to be automated, i.e. by pressing a button on the site, then it would be trivial for malevolent websites to do it without any kind of authorization from the user. Have you ever heard of a site that automatically adds bookmarks, say on a desktop browser? To the best of my knowledge, it can't be done, and for good reasons. If the user wants a home screen button, they'll have to add it themselves. I think the best you can do is have a simple instructional graphic that shows the user how to do it for themselves.

Resources