Php 使用示例应用TwitterAPI,但返回Null
我使用twitter api php master通过twitter搜索关键字,但返回空值。真的不知道为什么会这样 我的代码如下:Php 使用示例应用TwitterAPI,但返回Null,php,twitter,Php,Twitter,我使用twitter api php master通过twitter搜索关键字,但返回空值。真的不知道为什么会这样 我的代码如下: <?php #### Include the class file #### require_once('TwitterAPIExchange.php'); #### Set access tokens #### $settings = array( 'oauth_access_token' => "[something]
<?php
#### Include the class file ####
require_once('TwitterAPIExchange.php');
#### Set access tokens ####
$settings = array(
'oauth_access_token' => "[something]",
'oauth_access_token_secret' => "[something]",
'consumer_key' => "[something]",
'consumer_secret' => "[something]"
);
$url = 'https://api.twitter.com/1.1/search/tweets.json';
$requestMethod = 'GET';
$getfield = '?q=test&geocode=37.781157,-122.398720,1mi&count=100';
$twitter = new TwitterAPIExchange($settings);
$response = $twitter->setGetfield($getfield)
->buildOauth($url, $requestMethod)
->performRequest();
var_dump(json_decode($response));
?>
我几乎是从这个例子中复制过来的。但是结果是空的。有人知道问题出在哪里