Twitter API Consulting

Free open source code for Twitter API Engagement Programming


// Copyright (c) 2013 Adam Green. All rights reserved.
// See for licensing of this code.

function get_last_tweet($user_id) {
	global $db;

	$query = "SELECT users.screen_name,, users.profile_image_url,
		tweets.user_id, tweets.tweet_id, tweets.tweet_text, tweets.created_at, tweets.retweet_count
		FROM tweets, users
		WHERE users.user_id = $user_id
		AND tweets.user_id = users.user_id
		ORDER BY tweets.created_at DESC
		LIMIT 1";
	return $db->select_array($query);

I'm building a Twitter app using @140dev's free source code for engagement.