Although I posted yesterday how to add your latest tweet to WordPress without a plugin, I made several changes to the script before I posted it to make it more “generic” and re-usable. Since I’ve changed it quite a bit, I decided to repost it. This new script also autolinks @usernames and #hash tags.
Directions are this easy: set the path of $tw_File with a static, writable file. Set $tw_userid to your Twitter user id. Done.
Download blog.adamscheinberg.com “get latest tweet” php snippet.
Hi. I’m trying to implement this code into my WordPress and having a little trouble. Can you tell me exactly how to “set the path of $tw_File with a static, writable file”?
John. Make a file yourfilename.html and place it on your server. Note the URL then in the script provided enter your file name where you see this $tw_File for example $tw_File = 'http://www.yourwebsite.com/yourfilename.html'; Then make sure you have the permissions set on that file for reading and writing.
Just curious how I would allow say 5 tweets with this?
Thanks!