Giter Site home page Giter Site logo

gitter-badger / tweetfetch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whitehouse/tweetfetch

0.0 1.0 0.0 16 KB

Stand-alone version of Tweet Fetch module originally developed for 2014 State of the Union Address as part of Tweet Server, https://github.com/whitehouse/tweetserver.

PHP 100.00%

tweetfetch's Introduction

Tweet Fetch

This module fetches tweets from Twitter via GET requests to the REST API documented here: https://dev.twitter.com/docs/api/1.1/

Usage

Configure and test your GET request here:

admin/config/tweetfetch

Set up a cron job or a script to poll Twitter for new tweets like this:

drush tweetfetch-fetch
drush tff

New tweets will be stored like this:

sites/<default>/files/tweets/0.json
sites/<default>/files/tweets/1.json
sites/<default>/files/tweets/2.json
                              .    
                              .    
                              .    
sites/<default>/files/tweets/N.json

Hooks

hook_tweetfetch

Modules can implement hook_tweetfetch($filepath) to capture the path to new files
and react (e.g. queue for pushing up to CDN).

hook_tweetfetch_tweet_alter(&$tweet, &$op)

Alter contents of $tweet before it's stored as JSON and alter $op to
determine how tweet will be processed (saved or skipped).

hook_tweetfetch_reset

Hook into reset event to clear caches locally or at CDN.

tweetfetch's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.