A simple liveblog using PHP that posts to itself, ADN and Twitter at the same time. Very rude, very hackable. Beware.
- PHP > 5.3
- Codebird PHP for Twitter
- PHP Curl needs to be installed for CodeBird. There are ways to disable that. Look 'em up.
This is a very simple liveblog. It posts to itself (sample at Nitin Khanna's Liveblog ) and to twitter and ADN.
It's not fancy, but it works. Beware, it's very easily hackable so make sure the passphrase you setup is strong.
If a post is >140 chars, it truncates to 75 chars and adds your liveblog link to the end. Same for ADN (truncates to 190 chars)
You'll need -
1. ADN access token.
2. Twitter consumer key and token.
Find and replace the following -
In index.php -
1. YOURLIVEBLOGHERE.COM - with your sitename.
2. YOURADNUSERNAMEHERE
3. YOURTWITTERUSERNAMEHERE
4. YOURLiveblogTITLEHERE
In create.php -
1. YOURSUPERSECRETPASSWORDHERE - This is your passphrase to save things. This is your last line of defence. Make it snazzy.
2. YOURLIVEBLOGHERE.COM
3. ADNACCESSTOKENHERE - Setup an ADN app for free at ADN Developer's Site and then generate an access token for your app
4. TWITTERAPIKEY, TWITTERAPISECRET
5. TWITTERUSERTOKEN, TWITTERUSERTOKENSECRET
6. YOURTIMEZONEHERE - Mine's America/Denver
7. YOURNAMEHERE - This is your name. Hi. Mine's Nitin Khanna
Now that you've setup the files, upload them to your server (if you've not already done that) and open yoursite.com/create.php and bookmark this.
The first field is your post and the second, smaller field is the passphrase.
Fill both and hit submit. If the post goes through, you'll see the words "Array" and the postID (it'll start with 1).
If it fails, well bupkis.
The posts will be displayed on yoursite.com
- Very weak login
- Doesn't support hashtags in Share links (Hashtags and @-mentions work when posting)
- Too much stuff is inline. This is a hack project. If you want to help me clean up the code, I'll accept all pull requests.
- I created this when I was exporting content from the WP liveblog plugin because that one didn't support an infinite stream. So, there could be bugs because of my cleanup. Oh well.