Creating a Tweet from HTML on Page - twitter

I'm trying to allow a user to create a tweet from content on a page.
I am listing a schedule of events on a page and would like the user to if they like click a button to send out a tweet per event. Just looking for someone to point me in the right direction. Thanks!
Event 1, 8:00 AM, Room: 101 [tweet this]
Event 2, 9:00 AM, Room: 102 [tweet this]
Event 3, 10:00 AM, Room: 103 [tweet this]

Check official Twitter documentation:
https://dev.twitter.com/docs/tweet-button#ways-to-add-the-tweet-button-to-your-website
You can add Tweet Buttons using javascript and then set attributes for them:
Tweet
This might help you -
set Tweet button 'data-text' contents dynamically with javascript, or..?

Related

Anchor Link Issue

I wonder if someone could help me troubleshoot some Anchor Link problems. I have 13 shows on the same page similar to the one below where I've created links from Read More and an image called Ticket.jpg. Both links work and go to the correct page location. The problem is that all text in the shows below become active links as well.
This is my problem page: http://bluefrogstudios.ca//index-copy.html
I've tried everything to correct this without any luck. Excuse my limited html knowledge.
"TRIOLOGY with Miles Black, Jodi Proznick & Bill Coon"
Saturday Feb.15th, 2014 Doors: 7:00 pm Show 8:00 pm
Semiahmoo Arts presents TRIOLOGY for another “Live From Blue Frog” concert recording...
READ MORE..
it looks like you have missed the closing </a> tag after a link in your HTML
Line 110:
<div class="ticket"><a href="/newshows.html#cuda"><img src="images/Ticket.png" alt="Ticket"></div>

Navigate in timeline to a specific year/month AND post (facebookID) with a single url

I noticed that with a URL of the format
facebook.com/username/timeline/2013/4
we move to the end of the specified month of the year.
Now I need to use an url to navigate a user in my timeline to a specific post (facebookID) in a way that he can still move up and down on timeline from this point of time (anchor).
Any clues?
On a Facebook page, each post's HTML element has its own unique HTML id.
You can make use of this fact to directly link to a post within a page on Facebook by identifying the post's id and using it as the fragment identifier in the URL.
To find a post's HTML element id, right click the particular post in your browser [I'm assuming Chrome], then click "inspect element". In the opened development environment, find an enclosing div of the inspected element which contains an id HTML attribute.
For example, a link to a particular post on Disney's March 2013 Facebook timeline is the following:
https://www.facebook.com/Disney/timeline/2013/02/#tl_unit_6154529015953642023

How to add dynamic table list to a Full calendar page?

I have implemented a Fullcalendar on a RoR page.
I would like to add a list (index) below the calendar showing events for the day the user selects. Click on a day and that days events list below the calendar. I'd like it to be dynamic (don't reload the whole page).
Please point me in the right direction to learn how to do this.
I have a subscription to Railscast. But, I'm not sure what to look for.
Thanks
You can use the dayClick callback to call an ajax function which populates your index/list
I think you should make a javascript function , that listens to the click event of 'tb' in Fullcalendar . It should trigger ajax call to fetch events from the database , filtered by date . This Railscast is a very nice example how ajax calls refresh some page content without reloading the whole page .

Twitter counter display random number

I've just added the Twitter button on my blog under each post, but the tweets number displayed is the same on each button and is random.
In addition to this, if I enter to a post the number displayed change :S
Any idea about this issue?
EDIT:
This is the code that I'm actually using for the Twitter button
<a class='twitter-share-button' data-count='horizontal'data-lang='it'
data-via='ZOMBIEKB' expr:data-text='data:post.title'
expr:data-url='data:post.url' href='https://twitter.com/share'>Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)
[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&
quot;//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore
(js,fjs);}}(document,"script","twitter-wjs");</script>
Each widgets data-url has to point to the url of the post it is describing not yout blog url:
yes: data-url="http://www.zombiekb.com/url-to-this-post/"
no: data-url="http://www.zombiekb.com/"

Is there anyway to add multiple Tweet buttons on the same page and have their own Tweet Counts

I was thinking of setting up some tweet buttons for people to tweet out various sections of a long article using #anchor tags
eg a URL like this
http://www.w3schools.com/html_links.htm#tips
http://www.w3schools.com/html_links.htm#questions
There would be a Tweet button next to each Anchor Tag
Is this possible and will each tweet button have their own unique Count on their respective buttons?
eg
Tweet<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Tweet<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Many thanks in advance
Cheers
Andy
Twitter disregards #fragments in their tweet button counts so multiple tweet buttons linking to multiple sections of a single page will all have the same count. You can have multiple tweet buttons on a single page with different counts but they will have to be fore separate pages. For example a blog of example.com could have two tweet buttons with different counts but they would have to be for:
example.com/1
example.com/2
A workaround is to play with GET values. You can use this kind of url for the tweeter button :
http://www.w3schools.com/html_links.htm?anchor=tips
http://www.w3schools.com/html_links.htm?anchor=questions
Then, you add some JS to jump to the anchor when the user come from tweeter.

Resources