v1.9.2.0
------------------
* BREAKING CHANGES - This new version will not be compatible with QVDs from a previous vers
* IMPORTANT - This version requires QVSource 1.4.7.5 or later.
* Added columns to feed table:
from_id as FeedItem_from_id,
status_type as FeedItem_status_type,
to_id as FeedItem_to_id,
to_name as FeedItem_to_name,
to_category as FeedItem_to_category,
story as FeedItem_story,
application_name as FeedItem_application_name,
application_namespace as FeedItem_application_namespace,
application_id as FeedItem_application_id,
has_at_least_this_many_likes as FeedItem_has_at_least_this_many_likes,
has_at_least_this_many_comments as FeedItem_has_at_least_this_many_comments,
* Added new vLikeCountThreshold and vCommentCountThreshold to config file and associated logic/loadscript. See notes in config file for more detail.
* vIgnoreCache moved to config file.
* Added warning notes on intro tab when vLoadCommentCountForFeedItems or vLoadLikeCountForFeedItems are not set to 1.
* App is now set to require QVSource 1.4.7.5.

1.9.1.2 - 02/08/13
------------------
* Added let vLoadCommentCountForFeedItems and vLoadLikeCountForFeedItems flags to config file. Currently recommended that these are turned off.

1.9.1.1 - 01/08/13
------------------
* vIsFirstTime flag is now based on the existence of FB_Feed.qvd instead of FB_Page.qvd

1.9.1 - 30/07/13
----------------
* Added test to check vLocalTimeZone is recognised.
* Fiexed error on Comments tab: if(NoOfRows('Params') > 1) then ==> if(NoOfRows('Params') > 0) then
* Now uses new LikeCountForItem table to get feed item likes.
* Now configured to require QVSource 1.4.7.1 or later.
* Should no longer error if no feed items are found on the initial reload. This application is however is only designed to run properly when at least one feeditem and one comment is found.
* Moved to GitHub.
* Config file renamed to config.txt.

1.9.0 - 24/06/13
----------------
* Added support for Comments and replies to comments (see new fields in FB_Comments table). These are not yet used in the UI.

1.8.9 - 28/05/13
----------------
* NOTE - THIS HAS A BREAKING CHANGE
* Updated to use TextAnalyserV2
* has_comments added to FeedItems table (BREAKING CHANGE)
* Now only runs messages through sentiment API which are not empty (i.e. <> '')

1.8.8 - 21/05/13
----------------
* Updated to use QVSource 1.4.4.7 which has a work around for recent breaking changes to the Facebook API (removal of comments_count field for FeedItems).

1.8.7 - 06/04/13
----------------
* vQVSourceAppId and vWorkingFolder moved into config file.
* Call to sendEmail now wrapper in errormode = 0;
* Fixed bug in CheckQVSourceStatus function.

1.8.6 - 27/01/13
----------------
* Fixed some bugs with yesterdays release.

1.8.5 - 26/01/13
----------------
* Loading comments Async now uses new processParamsAsync technique.
* Loading sentiment Async now uses new processParamsAsync technique.
* Loading posters/commenters Async now uses new processParamsAsync technique.
* Sentiment extration rewritten into sepatate functions, now much shorter, neater and reusable.
* Added Check Status functionality.
* Removed AllContentSentiment_Language
* Moved to using noCache=true parameter rather than using a QVSource load statement to first clear cache.
* Removed use of and references to urlEncode.
* appID=$(vQVSourceAppId) added to all requests. This ID is also now used in the subject of the email sent when loaded.

1.8.4 - 15/11/12
----------------
* Facebook Feed extraction now uses pageID instead of page - we now recommend using the id in the config file also as the vanity url name can change.
* Added functionality in to use Saplo API.

1.8.3 - 04/11/12
----------------
* Fixed error in summary count of users on intro tab.
* Added vLocalTimeZone and created _local versions of create times, dates and months.
* Removed some fields from those loaded for posters/commenters.

1.8.2 - 04/11/12
----------------
* Option added in config to load sentiment asynchronously for better performance (vAsyncSentiment).
* Option added in config to load user info asynchronously for better performance (vLoadPostersAndCommenterInfoAsync).
* Sentiment now only loaded when status = 'OK'.
* Commenter_name not Commenter_username now used in AllUsers data set which fixes an issue where the name for some commenters was empty (when loaded from QVDs).
* AllUsers_language and AllUsers_country added (parsed from locale) (when loaded from QVDs).
* Added Page_loaddate_Month to FB_Page (when loaded from QVDs).
* Comments Per Post vs Date no longer accumulative.
* Likes Per Post vs Date no longer accumulative.
* Removed print and export to Excel icons on charts.
* Added country and language charts for All Users.
* Fixed Sentiment Vs Gender Chart.
* Fixed error in summary count of posts and comments on intro tab.
* Various UI rearrangements and improvements on all tabs and many charts.

1.8.1 - 16/08/12
----------------
- Company renamed to Site in config file.

1.8 - 10/08/12
--------------
* Removed url encode function, now using _urlEncoded column from QVSource.
* New fields added to FacebookProConnector_Feed.
* Renamed FacebookProConnector_Feed to FB_Feed. Also renamed other tables.
* Fixed bug with isFirstTime not being set correctly.
* qv date columns added to FacebookProConnector_Posters.
* message_urlEncoded added to FacebookProConnector_Comments.
* Added call to clear comments cache for a feed item before re-requesting these (clearcache_searchPattern=$(feedID)_comments).
* Reduced looping where possible.
* Dropped FB_Pro_posterExistsKey and FB_Pro_commenterExistsKey.
* Site renamed to Company in config file.
* Table and columns names shortened and simplified.
* Simplified config so you now need to set let noDaysToGoBackOnInitialReload and let noDaysToGoBackOnSubsequentReloads = 2;
* uses QVX format in places and will be flly transitioned to this format soon.
* improved calls to logQVSourceError
* replaced http://localhost:5555 with vQVSourceBaseUrl variable from config file.
* no longer a separate vCompany variable - this is taken as the first line in th facebook sites config table.
* deleted all old variables which had accumulated and were no longer used.
* created 3 variables for sentiment colours
let vColNeg = 'RGB(255, 0, 0)';
let vColPos = 'RGB(0, 255, 0)';
let vColNeu = 'RGB(0, 0, 255)';
* Open facebook page now users user id rather than profile page link (this is because the config file now allows you to turn off getting detailed info on each user).
* Renamed QVD files.
* Fixed issue where it was still re-requesting comments for all feeitems in system rather than just those for feed items refreshed in current load.
* Now only attempts to load comments when the comment count on the feed item > 0.
* Retrieving User table for every poster and commenter is now turned off by default - this takes a LONG time and only results in additional gender and locale info for some of the users.

Still to DO:
------------
- Add support for replies of comments.
- Upgrade to use new datetime parsing expression for timestamps.
- How to show change/delta in site likes over time rather than overall number.
- If no comments to load = 0 it should ignore those parts of the script completely.
- Add in notes showing what percentage of comments have actually been loaded and move comment dependent KPIs onto separate tab with notes about this.
- Company should be named Site again or something different.
- Allow user to put FB url in config file?
- make fit in 1024 x 768
- check if it runs OK if no comments are found for any posts.
- Make charts on Time Trends tabs so all data is shown in x axis
- Ablity to take snapshots of comments and feed items each day so trending of likes and comments over time for a given post can be shown.
- Only reload comments for a feeditem if the updated_date has changed since the last load. According to the docs this is changed when a comment is added. NOTE there appears
to be a FB bug which might make this unworkable at present - https://developers.facebook.com/bugs/355128274557900 - we will monitor this.
- add in error table
- add in more trace statements
- batch users at 50 a time. This will require change to connector (although we can no run these async).
- Perhaps user info should be refreshed after the load date since their information was grabbed exceeds X days? (note getting user info is now turned off as default).
- Store all data to QVDs then reload from these QVDs as the last step.
- Figure out why date is being formated as yyyy-mm-dd.
*/