Giter Site home page Giter Site logo

custom-twitter-php-api's Introduction

Custom-Twitter-PHP-API

Copyright (C) 2013 Robin Bonnes. All rights reserved.

Description

Due to deprecating Twitter API v1.0, developers need to create oAuth authentication to retrieve tweets. This script does exactly the same, without the OAuth hazzle, so its much easier to use. Its only less advanced as Twitter API v1.1. It will retrieve tweets (and retweets) with their avatar, username and post date in JSON format.

Live Demo

Check the demo here: http://www.robinbonnes.nl/projects/custom-twitter-api/demo.html

How to use

You have two options:

  1. Get tweets by username:

twitter_api.php?type=timeline&username=yourusername&count=5&retweets=true

  • username = Twitter username to retrieve tweets from.
  • count = Number of tweets to retrieve. Default: 5.
  • retweets = Boolean to enable/disable displaying retweets. Default: true.
  1. Get tweets by search keyword:

twitter_api.php?type=search&q=yourkeyword&count=5

  • q = Search keyword to retrieve tweets from.
  • count = Number of tweets to retrieve. Default: 5.

Output:

[{"username":"test","type":"tweet","avatar":"http://.../.png","date":"21 January 13","tweet":"Hello"}, {"username":"test2","type":"retweet","avatar":"http://.../.png","date":"23 January 13","tweet":"Hello"}]

License

The twitter_api.php is free to use everywhere ;-)

Changelog

  • v1.0 - Release
  • v1.1 - Search function added
  • v1.2 - Several bugfixes
  • v1.3 - Added hashtag search support, little bit optimized and several bugs fixed
  • v1.4 - Special characters fix
  • v1.5 - New layout compatible

======================

Note: PHP extension CURL is required.

custom-twitter-php-api's People

Contributors

robinbonnes avatar

Watchers

 avatar  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.