Provides JS for Facebook custom actions and records how many times each action is posted.
JavaScript Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
static
test
README.md
app.yaml
authorizer.md
grunt.js
main.py

README.md

Facebook Web Clients

A set of front end components for performing social actions.

Building

The Javascript files are built with GruntJS (npm install gruntjs)

To build and run the tests, enter the following from the project base dir:

grunt test

Running Locally

Note that you will need to be on a domain expected by the appropriate guardian facebook app for the auth to be successful.

For instance, for "theguardian" facebook app:

Add the following to your /etc/hosts:

127.0.0.1 fwc.guardian.co.uk

Then visit http://fwc.guardian.co.uk:8080/test/demo.html

Installation & Usage Instructions for Editors

Installation

Create a new Microapp

You can now add a Facebook vote to any article.

Add Slot Rule for Football Rumours

This will add a think likely / unlikely vote to all Football rumours pages.

  • Go to Tools > Edit Slot Rules
  • Section: Football
  • Slot: above-standfirst
  • Component: facebook-components: Think (Headline) is Likely / Unlikely on Facebook
  • Rule type: Has Tag: Rumour Mill (series)

Usage

There are three types of vote to choose from:

Think (Headline) is Likely / Unlikely on Facebook

If the headline is making a prediction that the user can decide is likely or unlikely to happen.

Agree / Disagree (with Headline) on Facebook

If there is a controversial headline (which poses a yes / no question). For instance the user can agree or disagree with a headline such as "Should there be an EU Referendum?"

Agree / Disagree (with Author's Opinion) on Facebook

If the opinion of the author is controversial (as opposed to the topic). The user can elect to agree or disagree with the author's opinion. This should be placed at the bottom of the article so the user can read the full article before making up their mind.

URLS

Demo Page

http://facebook-web-clients.appspot.com/test/demo.html

Facebook Authorizer API

https://github.com/guardian/facebook-web-clients/blob/master/authorizer.md