Coder Social home page Coder Social logo

hashtag-pull's Introduction

Twitter, Vine, and Instagram Hashtag Feed

Get all Twitter and Vine posts with a certain hashtag, print the feed, and save to a database for future use. See working example.

How it works

  • Searches Twitter for images with the hashtag and saves them to the database.
  • Searches Twitter for links with the hashtag and a link containing vine.co, parses the link's contents for the twitter:player:stream and twitter:image meta properties and saves the mp4 video link and video placeholder to the database.
  • Only performs the above API calls every 2 minutes to avoid rate limiting.
  • Shows the feed of the pictures and videos from the database, and refreshes the feed every five minutes.

Configurations

Create a Twitter application

  1. Sign in with Twitter Developer
  2. Hover over your name in the top right corner then click "My Applications"
  3. Create a New Application. Enter a name (this is for your reference), a description (again for your reference), and your site's URL. The callback URL is a moot point for the use of the application so it can be left blank.
  4. Create my Access Token (this is a button, click it)
  5. View the details tab. Copy and paste the correlating keys and secrets into config.php.

Create an Instagram application

  1. Sign in with Instagram Developer
  2. Click "Register Your Application" (this is a button, click it).
  3. Create a New Application. Enter a name (this is for your reference), a description (again for your reference), your site's URL, and the url for the directory instagram where your app will live for the redirect uri.
  4. Create my Access Token (this is a button, click it)
  5. View the details tab. Copy and paste the correlating keys and secrets into config.php.
  6. Upload the app to your sever and navigate to the instagram directory from your browser.
  7. Authenticate your app.
  8. Copy and paste the value for the access token into the access token for instagram field in config.php.

Recommendations

Since this is using a work around for what will eventually be replaced by the Vine API, I would suggest using a cron job for the update() function and only calling from the database when a visitor hits the server. This should reduce load time and make sure the server is not over worked.

Build Instructions

This project uses Grunt to automate build tasks (eg. compile less and minimize js).

  • Install Node.js
  • Install grunt-cli: npm install -g grunt-cli
  • Install dev dependencies: npm install
  • Run grunt to compile, or grunt server to start a live development environment.

hashtag-pull's People

Contributors

jessfraz avatar

Watchers

Fabian Hernandez avatar James Cloos 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.