|TwiFarm v2.5 User Guide|
TwiFarm v2.5 Installation and Setting
The Archive Content, uploading details, Decompression and Installation
So, you have downloaded the archive file containing the script from the IRP-panel and unpack it. Here is list of files and folders.
Starting from version 2.5, the script moved to CMF CodeIgniter and now works with MySQL, which made it more stable in operation, as well as convenient to use and update from version to version.
You can see how everything is arranged, but, actually, there is nothing interesting in the structure - all actions perfomed through web interface and you do not have to look at the FTP.
To install TwiFarm we need to upload files at hosting. It is strongly recommended to upload entire archive file and unpack it on server directly, otherwise you can meet some problems (the files get broken during FTP session; encoding gets broken, etc.).
Now I'll show you how to install your software using the ISP manager panel
Note: your hosting provider can use another hosting control panel, but 99% of panels has the same possibilities. If you get stuck with installation - contact your hosting provider for help.
After all these steps we will see something like this
Now let's check correct permissions to files and folders before proceeding.
Now it is time to create a database for our script, here is the steps to do it with ISP manager:
Installing the script
Run your browser and type domain name, where you uploaded the script. You'll see the following picture:
Click the link "Please check your server before installing" in the blue oval to check your hosting modules and PHP version, which is critical to run the script correctly. You'll see the following picture:
If you see, some red entries with [FAIL] instead of [OK] - contact your system administrator / hosting technical support and ask to install the missing modules.
If you have got only green [OK] entries, return to the home page of the domain and continue with installation. You'll need to enter the data of previously created database into appropriate fields and click "Install."
If all data is correct, you'll be redirected to login page. But before proceeding we need to setup API keys for Twitter and Bitly
Let's deal with it.
Getting the data and configuring Farm to work with the Twitter API and the Bitly API
To use Twitter API we need to create an application in Twiiter. To do this, go here https://dev.twitter.com/apps and authorize with any Twitter account.
After login we will see this page
Click the button "Create a new application" and on the next page and fill in the required fields like this:
Specify any name  for your application, write a description , and URL  of our Twitter Farm, leave the field  blank, confirm that you agree with the rules , enter the captcha code  and click the blue button.
If you're succeded - you'll redirected to Twitter application page, with see six tabs: Details, Settings, OAuth tool, @Anywhere domains, Reset keys, Delete. Hit the “Settings”  tab and change the following settings as it shown at the picture (change Access from “Read Only” to “Read and Write” , and then put a check mark on the item “Allow this application to be used to Sign in with Twitter”  and finally click the blue button at the bottom ).
Next, hit the "Details" which contains the necessary parameters - named “Consumer key”  and “Consumer secret” . Store it anywhere, for example - in a text editor.
Now it is time to get similar API keys from URL shortener service - bit.ly
We need to create an account at the service and get the Bitly login and the Bitly key similar to Twitter.
There are 2 options,we register a new account in bit.ly or (recommended) log in using Twitter account, which was used while creating application in Twitter earlier.
Let's choose second option, click on the "Sign up with Twitter", if you have not logged in Twitter - the following window will open:
Enter data from Twitter account and click "Authorize". You'll see this page
Enter any e-mail address  (for example "[email protected]" - it'll be not checked), click "Create new Bitly account" ,and enter user area.
Then click your username in the upper right corner, and click “Settings” in drop-down menu. On the Settings page select the tab ADVANCED.
At the bottom of the page you'll find the link “Show legacy API key” , click it and get another API data for Farm, Login and API key (highlighted in red in the image). Write them down near previously saved data from your Twitter application.
Now it is time to finish with Twifarm installation
Open http://domainwhereyouinstalledfarm in your browser and fill in data
After login you'll see the first page of TwiFarm ‒ "Home".
This is an information page which displays a brief information: log of recent events, accounts at work, perfomed actions and their success rate.
But now to complete installation, we need to navigate to "Settings", so go to this tab, and enter the required data (which you previously stored) into the fields marked "Twitter API Settings" and click "Save"  and then do the same procedure with the API data to Bitly 
Setup Cron jobs
The software utility cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration and in our case it is used to execute some actions with twitter.
At the bottom of the "Settings" page you will see "CRON token" with 3 links, just save it in the text editor..
Let's setup Cron in ISP manager panel.
Login in panel and go to the section "Scheduler (Cron)"
We will need to create 3 tasks:
After this, all external actions with Twifarm is done. Now it is time to load data into the Twifarm directly and configure it to work.
"Home" tab review
As we have mentioned above, it is an information page which displays a brief log of recent events, and system information: Twitter accounts loaded in Twifarm , how many actions have been made , percent of the successfull actions . You also can view 10, 50, 100, 250, 500, and 1000 results per page  and navigate to detailed reports ("Actions" tab) by clicking the button "More" .
You can also manually start the action executions by clicking "Manual launch" button  (analog of the Cron link GO start).
The home page displays some additional important information ‒ the accounts that "Needs attention" . It is an accounts that exceeded error limits (which is configured at “Settings” section) and doesn't used anymore by Twifarm (have "Errors" status).
There are variety of errors which can raise during work - non-critical (exceeding the limit of the characters in tweets, try to follow suspended account etc) and critical (account is suspended, exceeding API limits etc). It's recommended to review your account, anyway you can bring them back to work individually by clicking on the red button "Stopped" , or in block by highlighting the accounts using checkboxes and clicking "ON" 
"Accounts" tab review
Accounts can be added one at a time manually  using the button "Add", or they can be imported from text file  (select the text file from your computer by clicking "Browse", then click "Import") and exported , the button "Export".
Import format: [username][space][password], 1 line=1 pair of username/password without separators.
As you can see from the picture, accounts can have the following statuses "Active" и "Inactive" as well as additional technical status, which we discussed earlier ‒ "Errors".
The status "Active" is assigned by the user or automatically after the creation/import of the accounts, the status "Inactive" may be assigned by the user, the status "Stopped" is assigned by the system, in the case of the exceeding error limit (specified in the tab "Settings")
Only Active accounts are executing actions (tweets, retweets, following, unfollowing) and the Inactive and Errors are not.
Account data represented in table:
Аccount login ("User") , tweets and retweets  quantity, how many people it has followed  and how many followers it has , errors count , and account status .
The columns can be sorted, and you can also search account by username (or part of username) .
You can enable, disable, check index (Yandex and Google), reset the statistics and delete statistics any of selected account (including group selection) using the appropriate buttons .
If your account is indexed by Google or Yandex, the corresponding icon will appear next to it
 with the number of the pages in the index. If the icon does not appear - your account is not indexed. Index is checking in 3 cases:
"Content" tab review
Almost each Twifarm function (such as twitting, following, unfollowing, etc.) uses the content from this page.
Starting with version 2.5, TwiFarm correctly handles such errors on receiving errors of lack of content. It proceeds with the following action, and the action for which there is no content will be disabled automatically, thus preventing further errors.
 "Links" subtab is used during twitting operation - accounts will tweet links and text from this subtab. Subtab format:
url [space] keyword or phrase, without separation symbols. Example:
http://www.site.ru/url.html keyword or phrase1
http://www.site.ru/url.html keyword or phrase2
In SED 3.5.х you can get the links in this format from the admin area. Select the current domain Utils - 1. Add keywords - add - the link "Download archive: urls.zip" will appear at the bottom.
"Keywords" subtab is used by any action that used keywords as parameter:"Tweet text from keyword search", "Retweet status from keyword search", "Follow by key". Keywords should be added in following format: one phrase per line without separation symbols. As you can see the subtab window is divided into two areas: added keywords are located at the left side and your keywords based content from twitter at the right side (it will appear later after cron-based parsing operation).
"Text strings". subtab is very similar to "Links" subtab. This is the text, that will be twitted in "twitting" operation, so you can put here any text strings up to 140 characters length (according to Twitter restrictions) one per line.
 "Persons" subtab contains list of twitter accounts which are used to follow it and retweet their tweets. Subtab format: twitter account usernames (without "@" symbol)one per line. Example
It is recommended to put autofollowers here.
 The "RSS feeds" subtab is used by "Tweet RSS" action and tweets newest item (text+link) from random RSS feed. Format: one RSS feed per line. .
 subtab "Trands". is used by "Tweet trands" action. Twifarm parses trands from twitter by this keywords and than adds it to tweets. Trands are taken in all languages, duplicates are removed, also you can add trands manually.
All trands are "temporary", it does not make sense to keep them for a long time. Trands parsed by the Cron link PARSE TRANDS - it is recommended to do 1-2 times per day.)
 - tag "Status ID". It is used by the setting "Retweet by number". Number is the part in URL - https://twitter.com/account/status/number here
You can add these numbers manually (one number per line), or add from the "Reports" subtab using dark pluses next to tweets .
Click on a plus adds the number of the tweet to "Content -> Numbers". This status numbers is used by "Retweet status by ID" operation (a random number is selected from the list, and then tweet relevant to this number is retweeted).
"Settings" tab review
Let's expand all the tabs
All actions are performed if corresponding checkboxes are checked
 - tab “Tweeting". This group of settings is responsible for everything that regards tweeting functions.
 - tab "Retweeting". This group of settings is responsible for everything that regards retweeting functions.
 - tab "Following". This group of settings is responsible for everything that regards following functions.
 - - Option "Unfollowing” unfollow early followed twitter account if it is not follow your account during 5 days. Thus accounts of the Farm never unfollow each other;
Unfollowing is the most intense action, it generates 4 requests to the Twitter API per action.
 -"Action settings." The number of executed actions (which you configured at    ) per single Cron job go?token. For example if there is a 3, then Farm executes 3 actions in a single Cron job.
In the drop-down list you can give each of the 24 time periods its own number of actions, that makes you accounts be "humans" and avoid bans! For example, from 00.00 to 7.00 your accounts will "sleep", and from 7.00 to 18.00 - high activity, from 18.00 - 00.00 medium activity.
Current time period is highlighting with black.
 - "Account error limit". . Every account has own "unsuccessful actions" counter, when counter reached this error limit, this account gets disabled with "Error" status. Typically, there are suspended and non-valid accounts, anyway, you can manually review it and make a decisition what to do with them.
It is recommended to set up more then 10-20 number of errors, otherwise you will have to monitor and restore accounts from "Stopped" status to "Active" very often.
 - "CRON token". A group of 3 necessary links to execute various actions (already reviewed above - "launching Cron jobs").
 - "IP interface". If you VPS / Dedicated server has more than 1 IP - you can specify it here, it is makes Farms less suspicious. Specify one address for 1 farm.
,  - "Twitter API Settings" and "Bitly API Settings". Here we define the service access settings for the Twitter API and Bitly API services (already reviewed above)
,  - "Yandex XML Settings". Accesses from Yandex XML service to avoid bans? during checking account index in Yandex.
"Stats" tab review
This tab contains extended statistics for executed actions. Following filters are supported : date ranges , accounts usernames , keywords in actions , types of actions  (tweet, retweet, follow, etc.), results per page . Successfull actions are marked with green circle  unsuccessfull - with yellow triangle  , clicking this triangle will display errors returned by Twitter API.
You can also add data to the tab "Content" -> "Status ID" by clicking on the plus sign , thus you add this tweet to the list of tweets which is used for retweeting.
There is a navigation menu at the very bottom , you can move through the logs by clicking Prev|Next links, or select the desired page from the drop-down list.
Definition of symbols
How to diagnose unsuccessful actions?
Every unsuccessful action has an error returned by Twitter API, you can see this error by clicking the yellow triangle , that action error log to be shown .
This is all. Long live your Farms.
Всем спасибо, с вами был SafariLive, до новых встреч!