コード例 #1
0
<?php

// ctwitter_max3.php
//
// this code replaces twitterStreamMaxGeo.php for the Twitter v1.1 API requiring Oauth
//
// You will need to create a Twitter App from your account and replace the fields below with
// your: consumer key, consumer secret, access token, and access secret - strings
//
// A simple class to access the Twitter streaming API, with OAuth authentication
//
//	Mike (mike@mikepultz.com)
//
// Simple Example:
//
require 'ctwitter_stream_max3.php';
//
$t = new ctwitter_stream();
//
$t->login('ZdzfNxV34jhQlNFy8OHeOA', 'eXzUOf778AqU8hAhpRbCTnnSN0T7neYtg8dIWDC7j3bs', '205589709-5kRI1fllJvU34v3xZhRlwYV9OSn9LrTajtxSrvO8', 'u5MuSxPseBemU89WlMxEFawYwjlkFL8XA0eHlReCnQ');
//	$t->login('consumer_key', 'consumer secret', 'access token', 'access secret');
//
//	$t->start(array('facebook', 'fbook', 'fb'), array() );  // search for 'facebook'
$t->start(array(), array('-180', '-90', '180', '90'));
// search entire world for geo-coded tweets
コード例 #2
0
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<?php 
require 'ctwitter_stream.php';
?>
 </head>
<body>
test
<?php 
$t = new ctwitter_stream();
$t->login("NQ2NBPFv3L54bY5WRUKxE93kK", "cKpcbIbA55ZbmyWHwhZmGvdcrsvYv2KAAVEhPiQs8YyK6WV5h5", "3862041801-mf9oAVnUb6tXDKarqaMgD7eJEIiIbo9YVgJ50u1", "M9vJEiyjglgTb6zYKiRAHZA8dnwbKKBPb8d6GkWBgtDCe");
$t->start(array('albuquerque', 'abq', 'burque', '505', 'land of enchantment'));
// $t->start(array('-106.77','35.00','-106.43','35.25'));
?>
</body>
</html>