Jump to content

Twitter and Tumblr now playing

Recommended Posts

I recently started using http://tumblr.com and although it isn't as popular as Twitter, it has other benefits (such as no character limitation)


That got me thinking, that if we can get our now playing updating twitter every 10 minutes then it must be possible with tumblr. I couldn't find a script that would take a twitter post and cross post to Tumblr, nor could I find one for Shoutcast to Tumblr, so I created one, then decided to merge it with the existing twitter one we use and came up with the attached!


Please note that there are two areas you need to configure in twitter.php (the only file you need to edit)


At the top of the file, the twitter and shoutcast settings

#Consumer key token

#Consumer secret token

#Access Token

#Access Token Secret 

$twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $token, $secret);
$twitterObjUnAuth = new EpiTwitter($consumer_key, $consumer_secret);

$refresh = "600";  // Page refresh time in seconds. Put 0 for no refresh
$timeout = "5"; // Number of seconds before connecton times out - a higher value will slow the page down if any servers are offline



and further down the page


$tumblr_email    = 'YOUR TUMBLR EMAIL ADDRESS';
$tumblr_password = 'YOUR TUMBLR PASSWORD';
// Data for new record
$post_type  = 'regular';
$post_title = 'Recently played';
$post_body  = $song[1] . ' http://Station URL HERE';



Please make sure you edit both sections.


Also, make sure that title.txt is writeable on your server.


We keep twitter.php open in the background so it refreshes and posts every 10 minutes


I've included the pal script from the original, although we don't use SAM Broadcaster anymore (Go RadioDJ!) and this script should work whatever program you are using to stream!

Link to comment
Share on other sites

Yay Techmonkey Posted them!


I use Both scripts on My Shoutcast with Twitter and today the tumblr account! And without single PAL script either !!!


The twitter feed can be seen here http://baldyradio.com


And we post pretty much the same to this http://baldyradio.tumblr.com/


I Hope Everyone manages to get this working as i reckon theyre both useful Utilities!


Go tech Monkey!!!

  • Like 1

My Blog https://djgarybaldy.blogspot.com

User of RadioDJ FREE radio playout software since 2010.

How to Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

RadioDJ is my FAVOURITE piece of software it works when I need It



Link to comment
Share on other sites

  • 2 months later...
I actually started using tumblr recently and I get more hits to my tumblr blog then to my website so I been really considering making tumblr my main website (just giving it the main domain name) and this script is great and was very easy to add it to my tweetcast script I already had working. THANKS so much for this!!! oh you can view my tumblr blog at http://tm101radio.tumblr.com
Link to comment
Share on other sites

  • 2 months later...
  • 10 months later...
I can't seem to get this to work at all.


The original file seems to not be there, the code that is shown is just a part of it, so it would not work. I'll PM the OP.

Stream101 | Affordable Media Solutions

Shared cPanel? Web Hosting | WordPress Hosting | Premium Stream Hosting

TOLL-FREE: (616) 277-7280 | 30 Day NO QUESTIONS Money-Back Guarantee

100% Cogent Free Network | CloudLinux OS | Tier 1 Bandwidth | Grand Rapids, MI

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...