I’m using the following code for fetching a latest tweet but I would like the TWITTERUSERNAME
to be different depending on the domain it is on as it’s a template that is being called from one place but used across multiple domains.
<script type="text/javascript">
jQuery('document').ready(function() {
jQuery.getJSON('http://twitter.com/statuses/user_timeline/TWITTERUSERNAME.json?callback=?', function(data) {
jQuery('#tweet').html(data[0].text);
});
});
</script>
I’m guessing just some kind of if statement in php to replace the TWITTERUSERNAME value in the script?
Any pointers on this would be great
Something like:
Caveats/Warnings
The details in the array (“domain.com”,”otherdomain.com”) would not match any contained subdomains (so “www.domain.com” and “www.otherdomain.com” would be seen as not being the same as “domain.com” and “othersomain.com”).