WordPress.org

Forums

Recent Tweets
How to Add Profile Image to Tweets (1 post)

  1. Ryan Gatto
    Member
    Posted 2 years ago #

    One of our clients wanted to add his profile image next to each tweet so we had to manipulate the plugin a little.

    1) Make a local copy of twitter-blogger.js
    2) Updated the path to look for our local version of twitter-blogger.js in recent-tweets.php
    3) Added "var profile_image = twitters[i].user.profile_image_url;" to twitter-blogger.js
    4) and changed line 11 in twitter-blogger.js from:
       statusHTML.push('

  2. <span>'+status+'</span>
    '+relative_time(twitters[i].created_at)+'
  3. ');

    to

    statusHTML.push('

  4. <img src="'+profile_image+'" height="24" width="24"><span>'+status+'</span>
    '+relative_time(twitters[i].created_at)+'
  5. ');

    Once that is done you should get a thumbnail of the users profile photo next to each tweet.

    http://wordpress.org/extend/plugins/my-recent-tweets/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.