“Quick Start Guide ” Documentation by “CA Webstore” v1.0


“PHP Twitter User Timeline & Search Plugin”

Created: 10/02/2013
By: CA Webstore
Email: support@democode.net

Thank you for purchasing my plugin. If you have any questions that are beyond the scope of this help file or full documentation found here, please feel free to email via my user page contact form here. Thanks so much!


Table of Contents

  1. A: Installation
  2. B: PHP Code Explanation
  3. C: CSS Files and Structure

A) Installation - top

define('TWITTER_API_PKG_DIR','/');
define('TWITTER_CONSUMER_KEY', '*Consumer key');
define('TWITTER_CONSUMER_SECRET', '*Consumer secret');
define('TWITTER_ACCESS_TOKEN', '*Access token');
define('TWITTER_ACCESS_TOKEN_SECRET', '*Access token secret');
define('TWITTER_CACHE_FOLDER', 'twitter_api_pkg/caches/twitter-');
define('TWITTER_CACHE_SEARCH_FOLDER', 'twitter_api_pkg/caches/twitter-');

Other paths in code that may need to be changed:

In index.php

require_once "twitter_api_pkg/twitter_config.php";
require_once "twitter_api_pkg/classes/twitterapirequest.php";
require_once "twitter_api_pkg/functions/twitter_user_timeline.php";
require_once "twitter_api_pkg/functions/twitter_search.php";


Or in jquery_example.php

require_once "twitter_api_pkg/twitter_config.php";
require_once "twitter_api_pkg/functions/twitter_user_timeline.php";
require_once "twitter_api_pkg/functions/twitter_search.php";

B) PHP Code Explanation - top

In index.php, the line below generates the Twitter search form:

echo twitter_generate_search_form('index.php',true,true,true,true,$_GET);

and the line below shows the actual Twitter search results after the form is submitted:

echo twitter_search_php($_GET);

In index.php, the line below generates the Twitter user timeline for the example 'google' (replace 'google' with the Twitter screen name that you'd like to display tweets for):

echo twitter_user_timeline_php('google');

In index.php, the line below generates a predifined Twitter search results for the example 'New York' (replace 'New York' with the Twitter search term that you'd like to display tweets for):

echo twitter_search_php('New York','en','','');

In jquery_example.php, the line below generates a Twitter timeline for 'envato' (replace 'envato' with the Twitter screen name that you'd like to display tweets for):

echo twitter_user_timeline_jquery('envato',0);

In jquery_example.php, the line below generates Twitter search results for 'traffic' (replace 'traffic' and other variables with variables that you'd like to display tweets for):

echo twitter_search_jquery('traffic',0,'en','recent','40.757332,-73.955556,10mi');


C) CSS Files and Structure - top

CSS styles for Twitter results can be found in twitter.css.

The line below controls the styling and width of the Twitter search results box

#twitter_search_results{
clear:both;width:100%;margin:10px;color:#333333;
}

The line below controls the color of the links in Twitter search results

#twitter_search_results a { 
color:#0385b4;
}

The line below controls the styling and width of the Twitter timeline box

#timeline_tweets{
clear:both;width:100%;margin:10px;color:#333333;
}

The line below controls the color of the links in Twitter timeline

#timeline_tweets a { 
color:#0385b4;
}

Once again, thank you so much for purchasing this plugin. As I said at the beginning, I'd be glad to help you if you have any questions relating to this plugin. No guarantees, but I'll do my best to assist. If you'd like to dig deeper into the functionality of this plugin, please read the full documenation here. If you have a more general question relating to the scripts available on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.

CA Webstore

Go To Table of Contents