summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-09-14 11:11:48 +0200
committerAzul <azul@riseup.net>2016-09-14 11:11:48 +0200
commitf575f57915d5369269849352a70b0e4704c3fd19 (patch)
tree7b13646448e64e560101493eeac1a03c3a25dbd8 /doc
parent92481029074f34342cc35937f3aab94aca7887c7 (diff)
parent22478d315af3590d2a344eb1aa8cf2aec0730506 (diff)
Merge remote-tracking branch 'pr/237' into develop
Twitter Feature on Main-View from @loadtocode Twitter feature within home/index of LEAP web app as feed of tweets of one user's twitter account How to use it: set up an Application-only authentication by twitter (https://dev.twitter.com/oauth/application-only) and then create a config/secrets.yml including: ``` development: twitter: enabled: false # set to true for usage twitter_handle: XXXXX #put your twitter handle here bearer_token: XXXXX #put your bearer token here test: twitter: enabled: false # set to true for usage twitter_handle: XXXXX #put your twitter handle here bearer_token: XXXXX #put your bearer token here ``` things in the PR: - [x] gemfile:twitter - [x] twitter helper (caching (to avoid reaching twitter rate limits) - [x] index twitter view - [x] twitter css (twitter design as discussed in call: Profil-Header: Picture, Link to twitter + twitter_handle; removed picture and twitter_handle from individual tweet, heading aligns at the top, only the last 3 tweets are shown) - [x] script to generate bearer token - [x] script to invalidate generated bearer token - [x] documentation (Readme + Doc)
Diffstat (limited to 'doc')
-rw-r--r--doc/TWITTER_FEED.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md
new file mode 100644
index 0000000..dd3954c
--- /dev/null
+++ b/doc/TWITTER_FEED.md
@@ -0,0 +1,35 @@
+# Display of status updates from twitter on main view #
+
+This is a feature to include status updates that displays most recent tweets
+of a (determined) twitter account (accessed via Twitter API).
+If you chose to use it, the feature gets included in `home/index` of
+LEAP web app (as part of the main view).
+
+## How to use it ##
+
+* Create Twitter Application on https://apps.twitter.com/
+ * Visit https://apps.twitter.com/ and log in with the twitter account you want to use
+ * Make sure you have a mobile phone number registered with your account to be able to proceed
+ * Choose the option to `Create New App`
+ * Fill in Application Details and Developer Agreement and `Create your Twitter application`
+ * Choose the section "Keys and Access Tokens" to get your consumer key and consumer secret
+ * Optional: Go to section "Permissions" and change the "Access" from `Read and Write` (by default) to `Read only`
+ * Have your consumer key and secret by hand for one of the next steps
+
+* Activate the feature within your local LEAP Web Application
+ * If not already existing create a secrets-file in /config with the name secrets.yml (`/config/secrets.yml`)
+ * Secrets-file should contain the following, make sure its in YAML: {"development"=> {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}, "test"=>{"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}}
+ * To have your bearer token created, run script in terminal being in the file of leap_web: `script/generate_bearer_token`
+ * To have the script run properly you have to add before running: `--key your_consumerkey --secret your_consumersecret`
+ * Add also `--projectroot your_projectroot --twitterhandle your_twitterhandle` as well to not have manually put the data in your secrets-file
+ * The full command looks like this: `script/generate_bearer_token --key your_consumerkey --secret your_consumersecret --projectroot your_projectroot --twitterhandle your_twitterhandle`
+ * If you didn't give all your information to the script, had a typo or want to change anything else, please do so by finding the secrets-file at `/config/secrets.yml`
+ * Make sure that the correct twitterhandle and bearer-token is included
+
+* Deactivate your bearer token
+ * To deactivate your generated bearer token you can run script/invalidate_bearer_token
+ * The full command looks like this: script/invalidate_bearer_token --key your_consumerkey --secret your_consumersecret --token your_bearer_token
+
+### Default avatar image ###
+
+This feature uses by default the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks, you agree to follow the Twitter Trademark Guidelines as well as Twitter's Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/.