Skip to content

Commit 6b001f9

Browse files
committed
Fixed parse errors and undefined variable in foreach loop
1 parent e2dd9d8 commit 6b001f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Oauth.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function get_bearer_token(){
5353
$bearer_token = '';
5454
foreach($output as $line)
5555
{
56-
if($pos === false)
56+
if($line === false)
5757
{
5858
// there was no bearer token
5959
}else{
@@ -106,14 +106,14 @@ function invalidate_bearer_token($bearer_token){
106106
* Basic Search of the Search API
107107
* Based on https://dev.twitter.com/docs/api/1/get/search
108108
*/
109-
function search_for_a_term($bearer_token, $query, $result_type='mixed' $rpp='15'){
109+
function search_for_a_term($bearer_token, $query, $result_type='mixed', $rpp='15'){
110110
$url = "https://api.twitter.com/1.1/search/tweets.json"; // base url
111111
$q = $query; // query term
112112

113113
$formed_url ='?q='.$q; // fully formed url
114114
if($result_type!='mixed'){$formed_url = $formed_url.'&result_type='.$result_type;} // result type - mixed(default), recent, popular
115115
if($rpp!='15'){$formed_url = $formed_url.'&rpp='.$rpp;} // results per page - defaulted to 15
116-
$formed_url = $formed_url.'&include_entities=true' // makes sure the entities are included, note @mentions are not included see documentation
116+
$formed_url = $formed_url.'&include_entities=true'; // makes sure the entities are included, note @mentions are not included see documentation
117117
$headers = array(
118118
"GET /1.1/search/tweets.json".$formed_url." HTTP/1.1",
119119
"Host: api.twitter.com",

0 commit comments

Comments
 (0)