Jump to content

Getting recent tweets


KG60
 Share

Recommended Posts

I'm not sure if I'm posting this in the correct area so apologies if I'm not. I'm trying to get a selection of tweets appearing on a website in a similar style to the WordPress Juiz-Last-Tweet Widget.

I'm managed to get the actual design correct now but I'm not sure how to actually pull the tweets in. The idea is for a selection of about 10 tweets appearing on a 10 second rotation as per the attached file example.

I've got a version running on a test site at http://owltreeweb.solutions/bni-bolton

My php & javascript coding knowledge isn't great so any help on getting this completed would be greatly appreciated.

I do have a latest tweets script running at the right of the screen, so I have the Twitter data widget ID,  but I think the Juiz-Last-Tweet option which is currently in the footer of the site looks a lot smarter and I would like to replace the current one. 

I do have the .js files if they are any help.

Thanks in advance.

post-2810-0-05356300-1458319225_thumb.pn

Link to comment
Share on other sites

http://modules.processwire.com/modules/markup-twitter-feed/

This module works fine, though you will have to generate the markup to achieve the "looks" of the Wordpress plugin you are puttin as example. Although, thanks to Processwire, nothing will get in your way to accomplish this :)

Check this part of the module documentation:

Or you can iterate the feed rather to generate your own markup... Note that when doing this, all of the $options that modify output are no longer applicable, as you will be given the data exactly as it is from Twitter. This will likely change in the next version. But for now, if you take this route, you should avoid setting any options that would affect the output, so that you will not be affected by changes in the next version.

$t = $modules->get('MarkupTwitterFeed');
$t->limit = 3;
foreach($t as $item) {
echo "<p>$item[text]<br /><span class='date'>$item[created_at]</span></p>";
}

You might also want to to take a look at:

https://dev.twitter.com/overview/api/tweets

To know how the tweet objects are organized in the array returned by the module. (take a look at how $item variable is accesed when echoing the string)

  • Like 4
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...