File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ function get_bearer_token(){
53
53
$ bearer_token = '' ;
54
54
foreach ($ output as $ line )
55
55
{
56
- if ($ pos === false )
56
+ if ($ line === false )
57
57
{
58
58
// there was no bearer token
59
59
}else {
@@ -106,14 +106,14 @@ function invalidate_bearer_token($bearer_token){
106
106
* Basic Search of the Search API
107
107
* Based on https://dev.twitter.com/docs/api/1/get/search
108
108
*/
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 ' ){
110
110
$ url = "https://api.twitter.com/1.1/search/tweets.json " ; // base url
111
111
$ q = $ query ; // query term
112
112
113
113
$ formed_url ='?q= ' .$ q ; // fully formed url
114
114
if ($ result_type !='mixed ' ){$ formed_url = $ formed_url .'&result_type= ' .$ result_type ;} // result type - mixed(default), recent, popular
115
115
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
117
117
$ headers = array (
118
118
"GET /1.1/search/tweets.json " .$ formed_url ." HTTP/1.1 " ,
119
119
"Host: api.twitter.com " ,
You can’t perform that action at this time.
0 commit comments