Settings

After a successful login, you will see Aggies’s front end interface as below.

../../_images/main_menu.pngMain Menu

Fetching

Fetching allows Aggie to receive feeds from all sources at a global level.

Toggling ON/OFF Fetching

Fetching can be enabled or disabled by toggling ON/OFF the fetching toggle. To toggle ON/OFF fetching, please follow the steps below.

  1. From the menu bar, click Settings and select Settings.

    ../../_images/settings.pngFetching ON/OFF

  2. Click ON/OFF on the fetching toggle to switch fetching ON/OFF.

    ../../_images/toggle.pngFetching ON/OFF

Social Media Feed Authentication

Adding Media Feeds to Aggie

  1. From the header menu, click on Settings.

    ../../_images/settings.pngSettings Menu

  2. From the dropdown list, click on Settings.

    ../../_images/toggle3.pngMedia Authentication

  3. Click on Edit to authenticate the Twitter, Facebook or Elmo feed settings.

    ../../_images/social_media_feed_authentication.pngMedia Authentication

Note: Now we need to generate the access tokens for all social media sources. After that, we would copy and paste respective authentication tokens generated for each of the social media feeds, save the settings and toggle the Fetching switch ON.

Generating Source Tokens

Twitter API Access Token

  1. Visit Twitter’s Apps Page and login with your Twitter Credentials.

  2. Click on the Create New App Tab.

    ../../_images/twitter_app1.pngTwitter Apps

  3. Fill in the Application Details and agree to the developer agreement at the bottom to create the app.

    ../../_images/twitter_app2.pngTwitter Apps

  4. This will create access tokens as indicated below.

    ../../_images/twitter_app3.pngTwitter Apps

  5. Click on Create My Access Token to create Access Token and Access Token Secret.

    ../../_images/twitter_app4.pngTwitter Apps

  6. With these access tokens, fellow the instructions from Adding Media Feeds to Aggie section and edit the Twitter settings in Aggie.

Facebook API Access Tokens

  1. Visit Facebook’s Apps page and login with your credentials.

  2. Click on Create a new app at the top right corner.

    ../../_images/facebook_app1.pngFacebook Apps

  3. Type in the name of your app and click on Create New Facebook App ID.

    ../../_images/facebook_app2.pngFacebook Apps

  4. Type in your email address and choose the app category, eg. Apps for Pages and click on Create App ID.

    ../../_images/facebook_app3.pngFacebook Apps

  5. Select the pictures that apply and click Submit.

  6. Enter a site URL and click on next.

  7. Click Skip to Developer Dashboard to retrieve your App ID and App Secret.

    ../../_images/facebook_app4.pngFacebook Apps

  8. Click on the Show button and enter your password to show your App Secret.

    ../../_images/facebook_app5.pngFacebook App

  9. Now with your Facebook App ID and App Secret, copy https://graph.facebook.com/oauth/access_token?client_secret=xxx&client_id=xxx&grant_type=client_credentials into your web browser, replacing the (xxx) in secret = xxx and id=xxx with your App Secret and App ID respectively.

  10. Hit the return key to show your access token.

  11. With this access token,fellow the instructions from Adding Media Feeds to Aggie section and edit the Facebook settings on Aggie.

WhatsApp messages

The WhatsApp feature is documented in a conference paper. As WhatsApp does not currently offer an API, a Firefox extension in Linux is used to redirect notifications from web.whatsapp.com to Aggie server. Thus, you need a Linux computer accessing WhatsApp through Firefox for this to work. Follow these steps to have it working.

  1. Install Firefox in Linux using your distribution preferred method.

  2. Install GNotifier add-on in Firefox.

  3. Configure the add-on about:addons:

    • Set Notification Engine to Custom command
    • Set the custom command to curl --data-urlencode "keyword=<your own keyword>" --data-urlencode "from=%title" --data-urlencode "text=%text" http://<IP address|domain name>:2222/whatsapp
      • We suggest setting your keyword to a unique string of text with out spaces or symbols, e.g., the phone number of the WhatsApp account used for Aggie. This keyword must be the same one as the one specified in the Aggie application, when creating the WhatsApp Aggie source.
      • Replace IP address|domain with the address or domain where Aggie is installed (e.g., localhost for testing).

    ../../_images/gnotifier.pngGNotifier Add-on for Firefox

  4. Visit web.whatsapp.com, follow instructions, and enable browser notifications

  5. Notifications will not be sent to Aggie when browser focus is on the WhatsApp tab, so move away from that tab if not replying to anyone.

Google Places API

Aggie uses Google Places API to add location to the incidents, letting users to search for incidents by location. It also powers the maps generated by Aggie. Google accounts with a credit card get a higher free quota of API calls than those accounts without credit card.

  1. Get your key for Google Places API from your Google account and copy it here. Remember to limit the domain to where Aggie is hosted (e.g., aggie.africanelections.org) when creating you new key.

ELMO Tokens

  1. Log into your ELMO instance with an account having coordinator or higher privileges on the mission you want to track.
  2. In your ELMO instance, mark one or more forms as public (via the Edit Form page). Note the Form ID in the URL bar (e.g. if URL ends in /m/mymission/forms/123, the ID is 123).
  3. Visit your profile page (click the icon bearing your username in the top-right corner) and copy your API key (click ‘Regenerate’ if necessary).
  4. From Aggie, click Settings -> Settings and edit the ELMO settings. Remember to toggle the switch on, once you have saved the settings

Email Settings

This must be set up to allow newly created users to receive emails from Aggie with their login credentials. Three transport options have been implemented using nodemailer.js:

  1. SMTP, which requires having access to a working SMTP server.
  2. Amazon Simple Email Service (SES).
  3. Sendgrid, an online mail service accessible through a simple API.

In this example we are going to set up the email with Sendgrid’s service.

  1. Click the Settings tab and select the Settings option in the dropdown list.

    ../../_images/email.pngEmail

  2. Click Edit on the Email transport row of the email section (the last Edit).

    ../../_images/sendgrid1.pngSendgrid

  3. Choose the Transport method as SendGrid.

    ../../_images/sendgrid2.pngSendgrid

  4. Aggie then requests an API key for use with SendGrid as in the screenshot below.

    ../../_images/sendgrid3.pngSendgrid

Generating SendGrid API Key

  1. Visit SentGrid’s Page and set up an account. Sendgrid will take one or two days to verify your account before activating it.

  2. From your account click the Settings Menu and select API keys

  3. Click the blue Create API Key on the top right.

    ../../_images/sendgrid4.pngSendgrid

  4. Select General API key.

    ../../_images/sendgrid5.pngSendgrid

  5. Type a name for the API e.g. Aggie API key and set the appropriate permissions. The only permission needed for this key is the ‘Mail Send ’ one.

    ../../_images/sendgrid6.pngSendgrid

  6. Click Save to generate an API key for use with Aggie.

  7. Copy the API key and paste it into the api_key field referred to in Transport Email section and click on Submit.

    ../../_images/sendgrid3.pngSendgrid

  8. Set the App Email Address as the email address you used for your SendGrid application.

    ../../_images/sendgrid7.pngSendgrid

Widgets

Widgets are web components that can be added to webpages. In Aggie, widgets are used to display information for public consumption outside of the SMTC. As usual, there is need to be careful with what information is made public, so use widgets with care so not to link individuals with information that may compromise them. At the moment there is only one widget available, the Public Incident Map.

Public Incident Map

The Public Incident Map displays those incidents that have been marked public by the escalation team. It uses the Google Places API, and thus, should be set before using the map.

  1. Center and zoom define the main variables for the map. It will be centered in the country, city or other location you choose. The zoom variable specifies how large area will be displayed in the map.
  2. You can see the result at https:///widget/public_incident_map.html
  3. You can add the map to any webpage with the following code:
<iframe src="https://<your-domain>/widget/public_incident_map.html" width="xxx" height="yyy"></iframe>
  1. Markers in the map have different meanings according to the their color, as shown in the table below. You can copy this table for your site if needed.
Map Key
Verified true confirmed true incident
Verified false confirmed false incident
Unverified unconfirmed incident
Click to expand click to expand incidents