Brand Reputation Monitoring and Social CRM

Installation instruction

Requirements

  1. PHP version >=5.5.0
  2. Imagick PHP extension
  3. Operation system that supports the installation of supervisord daemon manager, crontab. The installation of the task manager was tested on Ubuntu 12.04 (as it is rather popular on AWS), but it should work also on 10.04 and greater. For now, if you have another OS, you have to install task manager manually, because we don't have detailed instructions yet.

Files

  1. Copy the files to a directory under your web-root, so the files and folder "application", "system", "mq_installer", "public", "index.php" and ".htaccess" must be in it. Files
  2. Open an application in your browser, you sholud see a database error (that's because we have not configured it yet). Files

Database

  1. In your PhpMyAdmin create new database (or you might use any other ways to create database). You can choose any available name, I will use the name "repucaution" to explain the next steps.
  2. In the file "application/config/database.php" find and set name of the database, that you've just created $db['default']['database'] = 'repucaution';
  3. In the file "application/config/database.php" find and set username and password, that you are using to connect to your databases(or to log in PhpMyAdmin):

    $db['default']['username'] = пїЅyour-db-usernameпїЅ;
    $db['default']['password'] = 'your-db-password';

    Database Save the file.
  4. Go to url "sitename.com/migrate" (where "sitename.com" is a url of the application). On this step database will be filled with tables. You should see a blank screen after operation is completed. To check if everything is ok, you can open your database in PhpMyAdmin. Database
    * If url "sitename.com/migrate" is not available, use "sitename.com/index.php/migrate". That also means that you need to configure ".htaccess" file (from "application" folder) to hide "index.php" uri part from url
  5. If you want to use prefixes for tables in the database: - In the file "application/config/database.php" fill in the prefix you want (I will use "rep_" for example) $db['default']['dbprefix'] = 'rep_'; - In the file "application/config/datamapper.php" set the same prefix: $config['prefix'] = 'rep_'; Database

    ThatпїЅs better to remove the old tables, but anyway everything will work. Like in step 4, go to url "sitename.com/migrate" (where "sitename.com" is a url of the application).

    The tables will have prefix now.

    Database

General

  1. To configure site title edit file "application/config/template.php" and set your title $config['OCU_site_name'] = "Custom title"; General Now you can see your custom title. General

Superadmin

  1. To log in application as super admin you have to go to "sitename.com/auth/login" page. Use the following parameters to log in:
    Login: super@admin.com
    Password: password
    Superadmin
  2. Error message Please fill in all API keys, otherwise users won't have access to some features means that you have some API keys not set.
  3. Error message means Cache directory is not writable or does not exist ( "application/cache" ) means that cache directory is not writable which is required. To make it writable use your console, and run command:
    sudo chmod 777 path/to/project/application/cache -R

    How to get into console you can see in the INSTALL TASK MANAGER section.

APIS

  1. To set up the keys for various API systems you must log in application as superadmin. How to log in is described in SUPERADMIN section. There is a form for API keys. APIS

Foursquare

  1. Register in https://foursquare.com
  2. Go to https://foursquare.com/developers/apps Foursquare
  3. Fill fields of form
    Redirect_url: http://sitename.com/settings/socialmedia/foursquare_callback Foursquare
  4. Insert your client id and client secret Foursquare

Linkedin

  1. Register in https://developer.linkedin.com/
  2. Go to https://www.linkedin.com/secure/developer Linkedin
  3. Fill fields of formbr
    Redirect_url: http://sitename.com/settings Linkedin Linkedin

Facebook

  1. Sign in https://developers.facebook.com/
  2. Register as facebook developer Facebook
  3. Add new app Facebook
  4. Check website Facebook
  5. Fill app name Facebook
  6. Choose category and create app id Facebook
  7. Go to app configuration and fill site url:
    http://yoursitename.com/settings/socialmedia/facebook_callback Facebook Use your site name instead yoursitename.com Facebook And go to developer dashboard Facebook
  8. Fill app domains and contact email Facebook
  9. Go to "Status & Review" tab and switch app to live mode, then push "Start a submission" button for getting publish_actions and manage_pages permissions Facebook
  10. Check permissions Facebook Then fill all needed app details: Logo, Description, Privacy Policy Url, Notes for items Facebook Example of notes for item:
    Please explain how you are using publish_actions to enhance a person's in-app experience.
    - We need publish_actions(and manage_pages) to allow logged in user to post updates on his fan page.

    Please provide step-by-step instructions so our review team can reproduce how you are using publish_actions in your app.

    • 1. Log in on yoursitename.com admin@admin.com/password
    • 2. Go to settings in right up conner
    • 3. Select Social Media on sidebar
    • 4. Connect your facebook account and select your fan page in dropdown
    • 5. Go to dashboard at right up conner
    • 6. Select Create link in Social Media section on sidebar
    • 7. Check facebook in post to section, add message in textarea, click Post Update button

    Your api keys you may find on dashboard tab and insert them in repucaution before your submission review was completed: Facebook

Facebook publish actions

  1. Please explain how you are using publish_actions to enhance a person's in-app experience.
    -We need rights to allow logged in user to post updates on his fan page.

    Please provide step-by-step instructions so our review team can reproduce how you are using publish_actions in your app:
    • 1. Log in on "" testuser@test.com/password
    • 2. Go to settings in right up conner
    • 3. Select Social Media on sidebar
    • 4. Connect your facebook account and select your fan page in dropdown
    • 5. Go to dashboard at right up conner
    • 6. Select Create link in Social Media section on sidebar
    • 7. Check facebook in post to section, add message in textarea, click Post Update button

Twitter

  1. Sign in https://apps.twitter.com/app/new
  2. Fill fields of form
    Callback url: http://sitename.com/settings/socialmedia/twitter_callback Twitter
  3. Go to manage API keys Twitter
  4. Go to permissions and switched it ot "Read and Write", then update settings Twitter
  5. Get your API keys Twitter

Paypal

  1. Sign in https:// paypal.com
  2. Go to https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-api-access Paypal

Instagram

  1. Register in http://instagram.com
  2. Go to http://instagram.com/developer/clients/manage
  3. Register a new client Instagram
  4. Fill form fields Instagram redirect uri: http://sitename.com/settings/socialmedia/instagram_callback Instagram
  5. Get your api keys Instagram

Bitly

  1. Sign in http://bitly.com
  2. Go to https://bitly.com/a/settings/advanced and view legacy api keys Bitly
  3. Get your API keys Bitly

Google

  1. Sign in https://developers.google.com
  2. Create new project Google
  3. Go to APIs tab and enable next API libraries: Analytics, Google Places Web Services, Google+, YouTube Data v3 Google
  4. Go to credentials tab and create new Client Id: Google Choose application type as Web Application: Google Configure consent screen: Google Fill domain url and redirect urls, please pay attention on using http or https and www prefixes, you also may add several kind of every redirect urls:
    http://www.yoursitename.com/settings/socialmedia/google_callback
    http://www.yoursitename.com/settings/socialmedia/youtube_callback
    http://www.yoursitename.com/settings/analytics/connect
    http://www.yoursitename.com/auth/google_signup
    http://www.yoursitename.com/auth/google_login
    Google Create Client Id

    Then go to tab credentials and create new server key: Google Leave this field empty: Google Now on credentials tab you have all needed keys: Google

Install Task Manager

Steps below describe how to install task manager on Ubuntu 12.04, but it should work well on 10.04 and later.

  1. To install task manager you have to use console(terminal) on your server as root user. Most of the times you should connect to server with SSH (using PuTTy or any other program). For example, if you have your server installed on Amazon Web Services (AWS), it has an explanation how to connect. Select your instance and press "Connect" button. Install Task Manager Then use provided instructions to connect. (you should have received *.pem key, when you were installing your instance) Install Task Manager
  2. After successful connection you should see a console (something like one shown on the pic below) Install Task Manager Suppose that you already have your version of the Repucation script installed on the server. For example, mine is located in "/var/www/gp" folder. By the way, script has "mq_installer" folder, where all the task manager installation files are stored.
    Using cd command change current directory to project's "mq_installer" folder. Write in your console: cd path/to/repucaution/mq_installer Install Task Manager
  3. Now you are in "mq_installer" folder. To make installation script executable run command in your console sudo chmod +x install_mq.sh

    To start task manager installation run command in your console sudo ./install_mq.sh

    Task manager installation script will be now running.

Uninstall Task Manager

Perform steps 1 and 2 from the INSTALL TASK MANAGER section. Then in you console run a command: sudo chmod +x clear_mq.sh && sudo ./clear_mq.sh

It will remove all system commands invoked constantly while a task manager was working i.e. supervisord daemon will not longer running, cron task will not be called. But all the software will stay installed.

To make task manager running again just repeat all the steps from INSTALL TASK MANAGER section.

Updating Application

  1. Every time you receive a new version of the application, do migrations. Go to url "sitename.com/migrate" (where "sitename.com" is a url of the application). On this step database will be filled with tables. You should see a blank screen after operation is completed. To check if everything is ok, you can open your database in PhpMyAdmin.

    Detailed in DATABASE section, (4).

  2. Check "application/config/database.php" for your database connections settings not rewritten. Detailed in

Problems

  1. When logging in as superadmin you get into ordinary user dashboard, try to go to url:

    http://sitename.com/migrate/index/59

    then

    http://sitename.com/migrate

    and then try to log in again