WordPress.org

Ready to get started?Download WordPress

Forums

Now showing latest 'tweet' (3 posts)

  1. justinbarkhuff
    Member
    Posted 5 years ago #

    Made a minor update to my WordPress site so it now displays my latest tweet (see the post-it in the top left corner):

    http://www.barkhuff.com/

    For now, that's about as much twitter/wordpress integration as I'm interested in. Hopefully this gives you some ideas on how to handle your own integration.

    - Justin

  2. MichaelH
    Member
    Posted 5 years ago #

    Cool. Wonder if it might be useful to report how you did that.

  3. justinbarkhuff
    Member
    Posted 5 years ago #

    @MichaelH: My solution uses Flash, Javascript, and PHP.

    The post-it note is a Flash SWF. Within the SWF, I have actionscript which expects the 'status' flash var to be specified. The actionscript sets the value of a dynamic text field to the value of the 'status' flash var.

    I wrote a WordPress plugin to retrieve my latest tweet using Twitter's API and write the necessary HTML/Javascript to embed the SWF and specify its flash vars. The value of the 'status' flash var is set to my latest tweet status.

    Specifically, the final output of my WordPress plugin looks something like this:

    <div class="tweet_pad" id="tweet_pad114739"><span>Gemma's got jury duty today.</span></div><script type="text/javascript">UFO.create({ movie:"http://www.barkhuff.com/wordpress/wp-content/plugins/tweet-pad/tweet-pad.swf",width:"310",height:"310",majorversion:"6",build:"0",wmode:"transparent",flashvars:"status=Gemma%27s+got+jury+duty+today."},"tweet_pad114739");</script></div>

    The actionscript in my SWF looks something like this:

    status_tf.text = _root.status;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags