Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ For now only two templating variables are available, more coming soon. You add a

Template | Description
--- | ---
`{{id}}` | Tweet ID
`{{tweet}}` | Tweet content
`{{date}}` | Formatted tweet date
`{{avatar}}` | User's Avatar Image
Expand Down
13 changes: 6 additions & 7 deletions api/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
/**
* Your Twitter App Info
*/

// Consumer Key
define('CONSUMER_KEY', 'CONSUMER_KEY_HERE');
define('CONSUMER_SECRET', 'CONSUMER_SECRET_HERE');
define('CONSUMER_KEY', 'zlgRmKt5yR7LnpXWEammKUFZE');
define('CONSUMER_SECRET', 'vCNsvScV6OQgG2SDrm1CHiMnve6qfNoB9UlH5lvEKHxe5ocqAF');

// User Access Token
define('ACCESS_TOKEN', 'ACCESS_TOKEN_HERE');
define('ACCESS_SECRET', 'ACCESS_SECRET_HERE');

define('ACCESS_TOKEN', '8550002-ptt6rJnaQQLanMOk66oDJoNDjRlEZEWmbhLLPkHoQL');
define('ACCESS_SECRET', 'CTWDWfdzpsCk3ZNG96VkG9Dzm2WmnoIx27nvEo1JuPzdi');
// Cache Settings
define('CACHE_ENABLED', false);
define('CACHE_LIFETIME', 3600); // in seconds
define('HASH_SALT', md5(dirname(__FILE__)));
define('HASH_SALT', md5(dirname(__FILE__)));
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
-moz-border-radius: 3px;
border-radius: 3px;
}

.example2 .tweet {
overflow: hidden;
}
Expand Down Expand Up @@ -137,7 +137,7 @@
<script class="source" type="text/javascript">
$('.example1 .tweet').twittie({
dateFormat: '%b. %d, %Y',
template: '{{tweet}} <div class="date">{{date}}</div>',
template: '{{tweet}} <div class="date">{{date}}</div> <a class="reply-link" href="https://twitter.com/intent/tweet?in_reply_to={{id}}">reply</a>',
count: 1,
loadingText: 'Loading!'
});
Expand Down Expand Up @@ -165,4 +165,4 @@
});
</script>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion tweetie.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
*/
var templating = function (data) {
var temp = settings.template;
var temp_variables = ['date', 'tweet', 'avatar', 'url', 'retweeted', 'screen_name', 'user_name'];
var temp_variables = ['id', 'date', 'tweet', 'avatar', 'url', 'retweeted', 'screen_name', 'user_name'];

for (var i = 0, len = temp_variables.length; i < len; i++) {
temp = temp.replace(new RegExp('{{' + temp_variables[i] + '}}', 'gi'), data[temp_variables[i]]);
Expand Down Expand Up @@ -110,6 +110,7 @@
}

var temp_data = {
id: tweet.id,
user_name: tweet.user.name,
date: dating(tweet.created_at),
tweet: (tweet.retweeted) ? linking('RT @'+ tweet.user.screen_name +': '+ tweet.retweeted_status.text) : linking(tweet.text),
Expand Down