atymic / twitter Goto Github PK
View Code? Open in Web Editor NEWTwitter API for Laravel 5.5+, 6.x, 7.x & 8.x
Home Page: https://atymic.dev
License: MIT License
Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x
Home Page: https://atymic.dev
License: MIT License
$default['token'] = Session::get('access_token')['oauth_token'];
$default['secret'] = Session::get('access_token')['oauth_token_secret'];
vendor/thujohn/twitter/src/Thujohn/Twitter/Twitter.php
Hi,
I've been using this package to connect to Twitter's API for a variety of uses and it's been great. However I have a consistent problem when trying to sign-in via Twitter.
I started off by using the code in your example for logging in and if I keep my version of that code in routes.php then everything works as expected.
The problem I have is that if I move that code into controller (so I can access useful methods before rendering the view) then I always run into problems. The request goes to Twitter, but then Twitter keeps reloading the token request page (https://api.twitter.com/oauth/authenticate?oauth_token=[removed]) without sending anything back to my callback (I am tracking requests on the network tab in Chrome's dev tools). Eventually I hit the Twitter API rate limits.
I'm using this with Laravel 5.
Here are the relevant snippets of code:
<?php
Route::get('twitter/login', ['as' => 'twitter.login', function(){
// your SIGN IN WITH TWITTER button should point to this route
$sign_in_twitter = true;
$force_login = false;
// Make sure we make this request w/o tokens, overwrite the default values in case of login.
Twitter::reconfig(['token' => '', 'secret' => '']);
$token = Twitter::getRequestToken(route('twitter.callback'));
if (isset($token['oauth_token_secret']))
{
$url = Twitter::getAuthorizeURL($token, $sign_in_twitter, $force_login);
Session::put('oauth_state', 'start');
Session::put('oauth_request_token', $token['oauth_token']);
Session::put('oauth_request_token_secret', $token['oauth_token_secret']);
return Redirect::to($url);
}
return Redirect::route('twitter.error');
}]);
Route::get('twitter/callback', ['as' => 'twitter.callback', 'uses' => 'SearchController@loginCallback']);
Route::get('twitter/signed-in', ['as' => 'twitter.signed-in', 'uses' => 'SearchController@signedIn']);
Route::get('twitter/error', ['as' => 'twitter.error', function(){
return Redirect::to('/error')->with('flash_notice', 'Unfortunately, we couldn\'t log you in, please try again.');
}]);
?>
<?php
public function loginCallback (Request $request)
{
if (Session::has('oauth_request_token'))
{
$request_token = [
'token' => Session::get('oauth_request_token'),
'secret' => Session::get('oauth_request_token_secret'),
];
Twitter::reconfig($request_token);
$oauth_verifier = false;
if (Input::has('oauth_verifier'))
{
$oauth_verifier = Input::get('oauth_verifier');
}
// getAccessToken() will reset the token for you
$token = Twitter::getAccessToken($oauth_verifier);
if (!isset($token['oauth_token_secret']))
{
return Redirect::route('twitter.login')->with('flash_error', 'We could not log you in on Twitter.');
}
$credentials = Twitter::getCredentials();
if (is_object($credentials) && !isset($credentials->error))
{
Session::put('access_token', $token);
Session::put('user_id', $credentials->id);
Session::put('user_screen_name', $credentials->screen_name);
Session::put('user_name', $credentials->name);
Session::put('user_profile_image', $credentials->profile_image_url);
return Redirect::route('twitter.signed-in');
}
return Redirect::route('twitter.error')->with('flash_error', 'Crab! Something went wrong while signing you up!');
}
}
public function signedIn ()
{
$tweets_json = Twitter::getHomeTimeline(['count' => '80']);
$user_bio = array();
$user_bio['screen_name'] = Session::get('user_screen_name');
$user_bio['user_name'] = Session::get('user_name');
$user_bio['user_profile_image'] = Session::get('user_profile_image');
return view('tweets', ['tweets' => $tweets_json, 'user_bio' => $user_bio]);
}
?>
Any help you could provide would be amazing.
Thanks
hi, i keep getting "Array to string conversion" error message from tmhoauth class when using your twitter class. the error message displays that the problem comes from line 399 which is
$this->request_settings['signing_key'] = $left . '&' . $right;
because your class extends the tmhoauth class, maybe you can give me some solution about this problem? thanks in advance!
tmhOauth is currently hardcoded in the repository (which is very bad), shouldn't it be moved to a Composer dependency instead ?
"themattharris/tmhoauth": "dev-master"
Hello @thujohn,
I've just added twitter-l4 to my Laravel project and I'm wondering how can I authenticate a user using your project. Do you have any example about how to do it?
Cheers!
- Installation request for thujohn/twitter ~1.2 -> satisfiable by thujohn/tw
itter[1.2.0].
- Conclusion: remove laravel/framework v5.0.13
- thujohn/twitter 1.2.0 requires illuminate/support 4.x -> satisfiable by il
luminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6 ......
- don't install illuminate/support v4.0.0|don't install laravel/framework v5.0.13
- don't install illuminate/support v4.0.1|don't install laravel/framework v5.0.13
............
Installation failed, reverting ./composer.json to its original content.
Any help please in this error !!!
Hello John,
I can execute this command Twitter::postTweet(array('status' => '[test tweet] Laravel is beautiful', 'format' => 'json')); and the tweet is posted on my account.
But $token = Twitter::getRequestToken($callback_url); is always return false.
So how can I authenticate other users?
Thanks
Documentation is available here: https://dev.twitter.com/overview/api/entities-in-twitter-objects
It would allow to have the true full URL instead of the t.co one, and to match hashtags exactly as does Twitter.
Here is a code sample that does it. It's not perfect, and is not from me, so I won't PR it.
/**
* addTweetEntityLinks
*
* adds a link around any entities in a twitter feed
* twitter entities include urls, user mentions, and hashtags
*
* @author Joe Sexton <[email protected]>
* @param object $tweet a JSON tweet object v1.1 API
* @return string tweet
*/
function addTweetEntityLinks( $tweet ){
// actual tweet as a string
$tweetText = $tweet->text;
// create an array to hold urls
$tweetEntites = array();
// add each url to the array
foreach( $tweet->entities->media as $media ) {
$tweetEntites[] = array (
'type' => 'media',
'curText' => substr( $tweetText, $media->indices[0], ( $media->indices[1] - $media->indices[0] ) ),
'newText' => "<a href='".$media->media_url_https."' target='_blank'>".$media->display_url."</a>"
);
} // end foreach
// add each url to the array
foreach( $tweet->entities->urls as $url ) {
$tweetEntites[] = array (
'type' => 'url',
'curText' => substr( $tweetText, $url->indices[0], ( $url->indices[1] - $url->indices[0] ) ),
'newText' => "<a href='".$url->expanded_url."' target='_blank'>".$url->display_url."</a>"
);
} // end foreach
// add each user mention to the array
foreach ( $tweet->entities->user_mentions as $mention ) {
$string = substr( $tweetText, $mention->indices[0], ( $mention->indices[1] - $mention->indices[0] ) );
$tweetEntites[] = array (
'type' => 'mention',
'curText' => substr( $tweetText, $mention->indices[0], ( $mention->indices[1] - $mention->indices[0] ) ),
'newText' => "<a href='https://twitter.com/".$mention->screen_name."' target='_blank'>".$string."</a>"
);
} // end foreach
// add each hashtag to the array
foreach ( $tweet->entities->hashtags as $tag ) {
$string = substr( $tweetText, $tag->indices[0], ( $tag->indices[1] - $tag->indices[0] ) );
$tweetEntites[] = array (
'type' => 'hashtag',
'curText' => substr( $tweetText, $tag->indices[0], ( $tag->indices[1] - $tag->indices[0] ) ),
'newText' => "<a href='https://twitter.com/search?q=%23".$tag->text."&src=hash' target='_blank'>".$string."</a>"
);
} // end foreach
// replace the old text with the new text for each entity
foreach ( $tweetEntites as $entity ) {
$tweetText = str_replace( $entity['curText'], $entity['newText'], $tweetText );
} // end foreach
return $tweetText;
} // end addTweetEntityLinks()
Hi,
I have been trying to use the Twitter::linkify($tweet); in my stream of tweets but I am unsure of what to do and how to get it to work with my foreach loop.
$tweets = Twitter::getSearch(array('q' => 'secretsocial', 'count' => 100, 'format' => 'array'));
Twitter::linkify($tweets);
foreach($tweets['statuses'] as $tweet) {
echo $tweet['text'];
}
Really not sure where to start with it
When you exclude mentions, the count doesn't work anymore:
$timeline = Twitter::getUserTimeline(array('screen_name' => 'foobar', 'count' => 3, 'exclude_replies' => true));
In my case at the moment, I only have one tweet in my response, because of the excluding of replies (the last two tweets are replies).
Both linkTweet
and linkify
take a $tweet
as an argument, but linkTweet
expects an object and linkify
expects a string (really $tweet->text
). At the very least, updating the docs would be good, but I would think a better approach would be to pass the object for both functions and let the function do the right thing. Can submit a PR for either, but wanted to check if there was a preferred method.
Marking it here to keep it on track - Twitter is going to add video upload support soon, so I would love this library to be updated as well (for Laravel 4).
https://twittercommunity.com/t/twitter-video-support-in-rest-and-streaming-api/31258/15
Hey,
First of all - awesome amaze-balls work on this package. Much appreciate all the time an effort you took to make it! I use it as I want to list all the mentions a twitter handle gets, and twitters own lil' widget thingy is none too keen on doing that.
However - for some reason, the code I've made just ends up spitting out a NULL value. I should note I'm using your package with laravel 5 which seems to work fine on my dev server. However, having deployed the code to my dev server, the 'getMentionsTimeline()' function returns NULL.
I've tried catching exceptions, but nothing is thrown. Are there any other error functions built-in I can make use of? The best viable alternative I have at hand would be to start inserting code directly into the Twitter.php file, but that's such a tedious process when having to upload minute changes to my production server.
I briefly considered if there might be any issues related to oauth, but since the code running on the dev machine is identical to the production machine, I can't see what might be the problem?
Any ideas?
Thanks!
Gazoo
Using Laravel v5.0.22
I have followed the installation instructions, it would appear that the class is being loaded, as I do not get an error complaining about the ServiceProvider, but it seems that the Facade does not resolve to the class.
Any ideas?
These three functions postFollow
, postUnfollow
and postFollowUpdate
have the following verification:
if (!array_key_exists('screen_name', $parameters) || !array_key_exists('user_id', $parameters)){
throw new \Exception('Parameter required missing : screen_name or user_id');
}
In these methods, the items screen_name
and user_id
are optional, but we must send at least one of them. Under this verification we have to pass both of them, otherwise it throws the exception.
So, to correct it, it's just necessary switch the logical operator from OR
to AND
.
Hi,
Twitter Login was fine in homestead. Then i changed callback_url,website to production ip adresses and I get this error in storage logs. Im developing on laravel 5. How can i solve it ? Is there missing library in digitalocean ubuntu vps ?
[2015-05-05 11:42:24] production.ERROR: exception 'Exception' with message '
Required oauth_verifier parameter not provided
/oauth/access_token
' in /var/www/laravel/vendor/thujohn/twitter/src/Thujohn/Twitter/Twitter.php:197
Stack trace:
#0 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Thujohn\Twitter\Twitter->getAccessToken(false)
I have looked through the code and can't tell if Application Only Authentication is working and enabled or not. If not, could you please make this a feature? Using it increases the amount or requests from 180 per 15 minutes to 450.
Hi,
To install this package in L5 through composer I need to add "minimum-stability: "dev". for my production env I don't want that.
When will this hit stable?
Regards,
Ronnie
postDM forces one to enter all 3 parameters when all that is needed is at least 2.
i.e user_id/screen_name and text
Not sure what is causing this and not sure it it is linkyfy breaking the link or because twitter re-shortened a bit.ly link.
I have another tweet where the user posted the full url and it comes through as a t.co link that works correctly so I'm assuming this is because it was only shortened once whereas the one in question was posted as bit.ly and then re-shortened by twitter to a t.co link.
Any suggestion to fix this?
I'm writing a Laravel 4 app that uses the getUserTime function of Thujohn (and works wonderfully) but for another aspect of my app, I'm using philo/twitter's oauth (which also works very well). The problem is that the namespaces for both of the packages are the same. Do you have any suggestions on how to get the Thujohn package to be recognized specifically for the functions I need it for and have function calls get confused with the philo/twitter package? I tried renaming the alias, hardcoding the use in the controllers, etc. If it could be a clue to help you help me, I have noticed that when I reverse the order of the package listing in config/app.php that the opposite package will start working.
Any advice would be much appreciated! Thanks!!
Twitter::set_new_config() and Twitter::getRequestToken() are present in the README.md file but are not present in the source code.
I'm trying to build an App which request for the access tokens and signs in to Twitter.
Need urgent response! Would be very helpful!
I was wondering if you would like to add an option to most of the functions to make it possible to output the response from twitter as an array?
Something like this
public function getUserTimeline($parameters = array(), $decode_option = false){
$response = $this->query('statuses/user_timeline', 'GET', 'json', $parameters);
return json_decode($response,$decode_option);
}
This makes it a lot easier to use the response for me (and i guess some others), the solution above keeps the default to false, so it is up to the user to decide to turn it on. Currently I added the 'true' statement manually: json_decode($response,true), but if you update the code this will be undone :)
Hi,
Was trying to post an image to a tweet, but without any luck yet. Have read the twitter API docs I can see this:
This end point has been deprecated. Please refer to Uploading Media: Multiple Photos for uploading one or more media entities.
https://dev.twitter.com/rest/reference/post/statuses/update_with_media
any chance to update the code to reflect this?
thanks
Hello!
When I try to access the tweets in the home view, it would not work. So since then I printed out the response and got this, stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => Bad Authentication data [code] => 215 ) ) ) 1.
Any suggestions?
Running the php artisan vendor:publish command fails with following error:
exception 'BadMethodCallException' with message 'Call to undefined method [package]'.
Best regards,
Ronnie Visser
I have no idea why.
try {
$response = Twitter::postTweet($tweet_opts);
var_dump($response);
} catch(Exception $e) {
echo $e->getMessage();
}
simply results in boolean false
being displayed.
I'm stuck even trying to debug this.
Hey there,
I'm trying to use your library for allowing any registered user of my app to programatically post tweets. If I'm not mistaken, the current setup will just pull whatever token pair I choose to hardcode into the config. I'm wondering if there's a way to dynamically push the token creds of a currently logged in user to the twitter library?
Hi!
I try to make very basic stuff, but can't make authorization to work properly.
Twitter::getRequestToken with original $callback_url and hardcoded url returns bool(false).
However, without passing the url, it redirects to Twitter authorization page, where I get the PIN code, but I don't want it to do the auth this way.
I'm pretty new to this, so technically I don't know what to look at, is it something wrong with those methods or twitter setup, so I would really appreciate any guidelines.
Hi, it takes a while now every time, because it has to check the Twitter server
Just installed your package, Laravel 4.1 on Windows with PHP 5.4.27.
Route::get('/', function()
{
//Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.
return Twitter::getUserTimeline(array('screen_name' => 'LeszekDev', 'count' => 20, 'format' => 'json'));
});
I created account on dev.twitter.com and updated config.php with API keys.
AS I see on Google there are a lot of similar problems.
In method query, this code fails when I get an error code from twitter api, php shows ErrorException in Twitter.php line 276:
Undefined index: message.
if (isset($response['code']) && $response['code'] != 200)
{
$_response = $this->jsonDecode($response['response'], true);
if (array_key_exists('errors', $_response))
{
$error_msg = $_response['message'];
}
else
{
$error_msg = $_response['error'];
}
$this->log('ERROR_CODE : '.$response['code']);
$this->log('ERROR_MSG : '.$error_msg);
throw new Exception('['.$response['code'].'] '.$error_msg, $response['code']);
}
My $_response prints;
Array
(
[errors] => Array
(
[0] => Array
(
[code] => 63
[message] => User has been suspended.
)
)
)
If I change code to read the array response correctly, it works
$error_msg = $_response['errors'][0]['message'];
$error_msg = $_response['errors'][0]['code'];
Hi, I'm using this bundle on my laravel website. Randomly, when I use "getUserTimeline" method, the return value is an error object. This is the dumped response:
object(stdClass)#384 (1) {
["errors"]=> array(1) { [0]=> object(stdClass)#390 (2) { ["message"]=> string(14) "Internal error" ["code"]=> int(131) } }
}
Any idea to solve this issue?
In a controller I do this:
$response = Twitter::getSearch(array('q' => $q, 'count' => 5, 'lang' => 'sv', 'result_type' => 'recent'));
die(print_r($response));
locally it outputs a json-object:
{
"statuses": [
...
]
}
Pushing the exact same code to pagodabox, outputs a php-object:
stdClass Object ( [statuses] => Array ( ...) );
I can't really comperhend what might cause this.
Hello,
I've been using this package for over a year now, this is the only time I've had an issue so first and foremost - thank you.
I've been using 2.0.*@dev
for about a month now as suggested for Laravel 5. I was due to launch a Laravel 5 version of one of my sites this evening, when I hit a bit of a wall when running composer update
on my production server. Of course, this package had updated since I last did a composer update
on my local therefore my production was ahead.
So, the previous code I had was:
$twitter = \Twitter::postTweetMedia([
'status' => twitter_status($photo->female),
'media[]'=> file_get_contents($photo->path),
'format' => 'json'
]);
$twitter = json_decode($twitter);
This was working perfectly up until about an hour ago when I updated the package locally to fix it here to ensure I can sleep happy.
Following the documentation provided, I've updated my config file (of which contains the new UPLOAD_URL, etc.) and have updated my code to be the following:
$media = \Twitter::uploadMedia([
'media' => file_get_contents($photo->path)
]);
$twitter = \Twitter::postTweet([
'status' => twitter_status($photo->female),
'media_ids' => $media->media_id_string
]);
$twitter = json_decode($twitter);
Now, this is working fine - but it has some odd behaviour. At least what I have experienced, the best way I can show you this is suggested you check out this screen recording - I quickly explain what's happening: https://www.youtube.com/watch?v=BhuzrzJL13I
Note, at the time of posting this - the video is still processing on the above link, but shouldn't take too long.
So to shorten down what I have done;
I hope you can help! Thanks, Joe.
GET statuses/oembed from twitter API only needs 1 parameter, ID or URL, but the selection condition needs both of those parameters to be there, you should change "OR" to "AND" to make it work I guess...
First of love the app. This is my first experience with laravel (and extensions, and it's really easy to set up and run, amazing)
Some of the responses from twitter seem to be not json-strings or something. Here is the error:
UnexpectedValueException
The Response content must be a string or object implementing __toString(), "object" given.
the code that triggers it:
open: /bootstrap/compiled.php
flush();
}
return $this;
}
public function setContent($content)
{
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) {
throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content)));
}
$this->content = (string) $content;
If I remove json_decode:
return $response;
//return json_decode($response);
Two examples(first, invalid key)
{"errors":[{"message":"Could not authenticate you","code":32}]}
function getSearch (q=cat count=5)
{"statuses":[{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Thu Jul 25 13:14:47 +0000 2013","id":360387655147614208,"id_str":"360387655147614208","text":"My cat is the best cat in the world. Best friends http://t.co/FMLGP2qq6d","source":"\u003ca href="http://twitter.com/download/iphone" rel="nofollow"\u003eTwitter for iPhone\u003c/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":486668948,"id_str":"486668948","name":"Nick Benerakis","screen_name":"BenerakisFit","location":"Easthampton, MA","description":"ISSA Certified Personal Trainer. WNPF Powerlifter. Umass Amherst Kinesiology Major","url":"http://t.co/Qyuwznvf69","entities":{"url":{"urls":[{"url":"http://t.co/Qyuwznvf69","expanded_url":"http://benerakisfitness.com/","display_url":"benerakisfitness.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":851,"friends_count":928,"listed_count":10,"created_at":"Wed Feb 08 14:51:15 +0000 2012","favourites_count":518,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":8401,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"022330","profile_background_image_url":"http://a0.twimg.com/profile_background_images/419661641/fitness.jpg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/419661641/fitness.jpg","profile_background_tile":false,"profile_image_url":"http://a0.twimg.com/profile_images/378800000173816211/e1d77b4fe609bf0b283a6bbfc52f80c1_normal.jpeg","profile_image_url_https":"https://si0.twimg.com/profile_images/378800000173816211/e1d77b4fe609bf0b283a6bbfc52f80c1_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/486668948/1374274168","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[],"media":[{"id":360387655151808512,"id_str":"360387655151808512","indices":[50,72],"media_url":"http://pbs.twimg.com/media/BQBaqbbCcAAMmb3.jpg","media_url_https":"https://pbs.twimg.com/media/BQBaqbbCcAAMmb3.jpg","url":"http://t.co/FMLGP2qq6d","display_url":"pic.twitter.com/FMLGP2qq6d","expanded_url":"http://twitter.com/BenerakisFit/status/360387655147614208/photo/1","type":"photo","sizes":{"medium":{"w":600,"h":600,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":1024,"h":1024,"resize":"fit"},"small":{"w":340,"h":340,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},{"metadata":{"result_type":"recent","iso_language_code":"ja"},"created_at":"Thu Jul 25 13:14:47 +0000 2013","id":360387654648467459,"id_str":"360387654648467459","text":"\u540c\u5c0f\u266a\u540c\u4e2d\u266a\n\u5c0f\u5b66\u751f\u306e\u3068\u304d\u4e00\u5ea6\u904a\u3093\u3060\n\u3053\u3068\u306e\u3042\u308b\u4e0d\u601d\u8b70\u306a\u4ef2ww\n\u7d30\u3044\u3088\u306d\u30fc\u305d\u3057\u3066\u80cc\u304c\u9ad8\u3043\n\u8272\u304c\u9ed2\u3044\u3068\u3053\u304c\u4f3c\u5408\u3063\u3066\u308b(\u00b4\u2200`)\n\u5999\u306b\u9762\u767d\u3044w\n #\u3075\u3041\u307c\u3063\u305f\u30d5\u30a9\u30ed\u30ef\u30fc\u3055\u3093\u3092\u540d\u524d\u3060\u3055\u305a\u306b\u8a9e\u308b","source":"\u003ca href="http://twitter.com/download/iphone" rel="nofollow"\u003eTwitter for iPhone\u003c/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1612505394,"id_str":"1612505394","name":"\u305f\u304b_(\u51fa\u623b\u308a)","screen_name":"takakara_cat","location":"\u3054\u3081\u3093\u306a\u3055\u3043\u51fa\u623b\u308a\u3067\u3059!!","description":"\uff0a\uff0a\uff0awas. nissin - now. auea 2525\uff0a\uff0a\uff0a *follow me_","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":169,"friends_count":265,"listed_count":0,"created_at":"Mon Jul 22 10:28:54 +0000 2013","favourites_count":26,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":112,"lang":"ja","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http://a0.twimg.com/images/themes/theme1/bg.png","profile_background_image_url_https":"https://si0.twimg.com/images/themes/theme1/bg.png","profile_background_tile":false,"profile_image_url":"http://a0.twimg.com/profile_images/378800000170624336/eea00b30790a379d61c31c7dabb02921_normal.jpeg","profile_image_url_https":"https://si0.twimg.com/profile_images/378800000170624336/eea00b30790a379d61c31c7dabb02921_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/1612505394/1374495267","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"\u3075\u3041\u307c\u3063\u305f\u30d5\u30a9\u30ed\u30ef\u30fc\u3055\u3093\u3092\u540d\u524d\u3060\u3055\u305a\u306b\u8a9e\u308b","indices":[73,95]}],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"ja"},{"metadata":{"result_type":"recent","iso_language_code":"ja"},"created_at":"Thu Jul 25 13:14:47 +0000 2013","id":360387654237429760,"id_str":"360387654237429760","text":"\u4eca\u306f\u30b5\u30fc\u30ad\u30e5\u30ec\u30fc\u30bf\u30fc\u306e\u7bb1\u304c\u304a\u6c17\u306b\u5165\u308a\u305f\u3093 #cat#catstagram#neko#\u732b http://t.co/coTQdAfy9l","source":"\u003ca href="http://instagram.com" rel="nofollow"\u003eInstagram\u003c/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":94048731,"id_str":"94048731","name":"\u7531\u307f\u305f","screen_name":"ajipota_ymt","location":"\u6771\u4eac\u90fd\u7df4\u99ac\u533a","description":"\u9676\u5668\u88fd\u4f5c \u9bf5\u307d\u305f\u5c4b\u306e\u304a\u77e5\u3089\u305b\u3084\u4f5c\u54c1\u3089\u304f\u304c\u304d\u30a4\u30f3\u30b9\u30bf\u30b0\u30e9\u30e0\u306e\u5199\u771f\u306a\u3069\u3002\u3042\u3068\u306f\u30d6\u30ed\u30b0\u3067\u3061\u308d\u3061\u308d\u3068\u3002\u697d\u3057\u304f\u307e\u3058\u3081\u306b\u3075\u3056\u3051\u308b\u4fc2\u3002","url":"http://t.co/1PCfPXwCVN","entities":{"url":{"urls":[{"url":"http://t.co/1PCfPXwCVN","expanded_url":"http://zeripota.tumblr.com/","display_url":"zeripota.tumblr.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":250,"friends_count":184,"listed_count":18,"created_at":"Wed Dec 02 08:26:08 +0000 2009","favourites_count":7,"utc_offset":32400,"time_zone":"Tokyo","geo_enabled":true,"verified":false,"statuses_count":9977,"lang":"ja","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http://a0.twimg.com/profile_background_images/687724399/22a77411203e8413b26dc2ceb2fa2fb3.jpeg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/687724399/22a77411203e8413b26dc2ceb2fa2fb3.jpeg","profile_background_tile":false,"profile_image_url":"http://a0.twimg.com/profile_images/344513261567395813/b51542e611a549ca974083da69439565_normal.jpeg","profile_image_url_https":"https://si0.twimg.com/profile_images/344513261567395813/b51542e611a549ca974083da69439565_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/94048731/1354293186","profile_link_color":"0099B9","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"95E8EC","profile_text_color":"3C3940","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http://t.co/coTQdAfy9l","expanded_url":"http://instagram.com/p/cMLGyGDrdD/","display_url":"instagram.com/p/cMLGyGDrdD/","indices":[44,66]}],"user_mentions":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"ja"},{"metadata":{"result_type":"recent","iso_language_code":"ja"},"created_at":"Thu Jul 25 13:14:46 +0000 2013","id":360387652777803777,"id_str":"360387652777803777","text":"RT @PokoSatou: \u306a\u306b\u304b\u3092\u611f\u3058\u305f\u4eba\u306fRT http://t.co/9TO7qcFMQ9","source":"\u003ca href="http://twitter.com/download/iphone" rel="nofollow"\u003eTwitter for iPhone\u003c/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":382951787,"id_str":"382951787","name":"\u732b\u6d77\u6708(=^x^=)","screen_name":"cat_jellyf_55","location":"\u611b\u77e5\u770c","description":"JK3 \u7d61\u3093\u3067\u304f\u308c\u308b\u3068\u5b09\u3057\u3044\u3067\u3059(^\u30fb\u03c9\u30fb^\u273f) \u30d5\u30a9\u30ed\u30fc\u304a\u9858\u3044\u3057\u307e\u3059\uff01 \u30a2\u30cb\u30e1/\u30cb\u30b3\u52d5\u306a\u3069\u306b\u30cf\u30de\u3063\u3066\u307e\u3059\u266a\u266a \u8a73\u3057\u304f\u306f\u2193\u2193","url":"http://t.co/nPHo8yv92l","entities":{"url":{"urls":[{"url":"http://t.co/nPHo8yv92l","expanded_url":"http://twpf.jp/cat_jellyf_55","display_url":"twpf.jp/cat_jellyf_55","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":552,"friends_count":506,"listed_count":2,"created_at":"Sat Oct 01 00:28:34 +0000 2011","favourites_count":448,"utc_offset":28800,"time_zone":"Taipei","geo_enabled":false,"verified":false,"statuses_count":9494,"lang":"ja","contributors_enabled":false,"is_translator":false,"profile_background_color":"B2DFDA","profile_background_image_url":"http://a0.twimg.com/images/themes/theme13/bg.gif","profile_background_image_url_https":"https://si0.twimg.com/images/themes/theme13/bg.gif","profile_background_tile":false,"profile_image_url":"http://a0.twimg.com/profile_images/378800000000596814/12375b75519fd876e2c67429a190651c_normal.jpeg","profile_image_url_https":"https://si0.twimg.com/profile_images/378800000000596814/12375b75519fd876e2c67429a190651c_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/382951787/1374480459","profile_link_color":"93A644","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"metadata":{"result_type":"recent","iso_language_code":"ja"},"created_at":"Thu Jul 25 13:08:21 +0000 2013","id":360386038591524864,"id_str":"360386038591524864","text":"\u306a\u306b\u304b\u3092\u611f\u3058\u305f\u4eba\u306fRT http://t.co/9TO7qcFMQ9","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1335401580,"id_str":"1335401580","name":"\u307d\u3053\u304d\u306e\uff08\u6b4c\u3044\u624b\u306b\u306a\u308a\u305f\u3044\u4eba\uff09","screen_name":"PokoSatou","location":"","description":"\u307d\u3053\u304d\u306e\u3067\uff5e\u3059\u3002\u308b\u30fc\u3075\u3041\u3044\u3068\u304b\u30de\u30b8\u5927\u597d\u304d\u3002\u3042\u3068\u3001\u6b4c\u304c\u4e0a\u624b\u304f\u306a\u308b\u65b9\u6cd5\u304c\u3042\u3063\u305f\u3089\u304a\u3057\u3048\u3066\u3061\u3087\u3002\u3067\u304d\u308b\u3060\u3051\u6bce\u65e5\u30c4\u30a4\u30fc\u30c8\u3059\u308b\u304b\u3089\u3088\u308d\u3057\u304f\u3067\u3059\u3002","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":275,"friends_count":742,"listed_count":1,"created_at":"Mon Apr 08 00:44:21 +0000 2013","favourites_count":8,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":1484,"lang":"ja","contributors_enabled":false,"is_translator":false,"profile_background_color":"ACDED6","profile_background_image_url":"http://a0.twimg.com/images/themes/theme18/bg.gif","profile_background_image_url_https":"https://si0.twimg.com/images/themes/theme18/bg.gif","profile_background_tile":false,"profile_image_url":"http://a0.twimg.com/profile_images/378800000186033918/261d198354c11a11a878f85fe38f72bc_normal.jpeg","profile_image_url_https":"https://si0.twimg.com/profile_images/378800000186033918/261d198354c11a11a878f85fe38f72bc_normal.jpeg","profile_link_color":"038543","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"F6F6F6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":7,"favorite_count":1,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[],"media":[{"id":360386038595719169,"id_str":"360386038595719169","indices":[12,34],"media_url":"http://pbs.twimg.com/media/BQBZMVSCEAEh6MF.gif","media_url_https":"https://pbs.twimg.com/media/BQBZMVSCEAEh6MF.gif","url":"http://t.co/9TO7qcFMQ9","display_url":"pic.twitter.com/9TO7qcFMQ9","expanded_url":"http://twitter.com/PokoSatou/status/360386038591524864/photo/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":480,"h":225,"resize":"fit"},"small":{"w":340,"h":159,"resize":"fit"},"medium":{"w":480,"h":225,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"ja"},"retweet_count":7,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"PokoSatou","name":"\u307d\u3053\u304d\u306e\uff08\u6b4c\u3044\u624b\u306b\u306a\u308a\u305f\u3044\u4eba\uff09","id":1335401580,"id_str":"1335401580","indices":[3,13]}],"media":[{"id":360386038595719169,"id_str":"360386038595719169","indices":[27,49],"media_url":"http://pbs.twimg.com/media/BQBZMVSCEAEh6MF.gif","media_url_https":"https://pbs.twimg.com/media/BQBZMVSCEAEh6MF.gif","url":"http://t.co/9TO7qcFMQ9","display_url":"pic.twitter.com/9TO7qcFMQ9","expanded_url":"http://twitter.com/PokoSatou/status/360386038591524864/photo/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":480,"h":225,"resize":"fit"},"small":{"w":340,"h":159,"resize":"fit"},"medium":{"w":480,"h":225,"resize":"fit"}},"source_status_id":360386038591524864,"source_status_id_str":"360386038591524864"}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"ja"},{"metadata":{"result_type":"recent","iso_language_code":"tr"},"created_at":"Thu Jul 25 13:14:46 +0000 2013","id":360387652375162882,"id_str":"360387652375162882","text":"RT @Instagram_tr: Akl\u0131m\u0131za gelmeyen \u015fark\u0131 isimlerini m\u0131r\u0131ldan\u0131nca \u00e7at diye bulan bir program yap\u0131n.Ziyan oldum.","source":"\u003ca href="http://twitter.com/download/android" rel="nofollow"\u003eTwitter for Android\u003c/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":180713717,"id_str":"180713717","name":"Ferhat KARADA\u011e","screen_name":"uykumvar_ulan","location":"\u015firinini ar\u0131yor :))","description":"bi k\u00f6\u015fede uyuyorum'dur","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":126,"friends_count":75,"listed_count":0,"created_at":"Fri Aug 20 08:31:21 +0000 2010","favourites_count":1379,"utc_offset":10800,"time_zone":"Athens","geo_enabled":true,"verified":false,"statuses_count":8680,"lang":"tr","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBC1C1","profile_background_image_url":"http://a0.twimg.com/profile_background_images/745690207/235c41f0967c85760c9ea3d9378883eb.jpeg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/745690207/235c41f0967c85760c9ea3d9378883eb.jpeg","profile_background_tile":true,"profile_image_url":"http://a0.twimg.com/profile_images/378800000012607004/6770aeff66c9a8aa5257b76ad3fcde92_normal.jpeg","profile_image_url_https":"https://si0.twimg.com/profile_images/378800000012607004/6770aeff66c9a8aa5257b76ad3fcde92_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/180713717/1369841244","profile_link_color":"B30000","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"metadata":{"result_type":"recent","iso_language_code":"tr"},"created_at":"Thu Jul 25 12:37:18 +0000 2013","id":360378223097417729,"id_str":"360378223097417729","text":"Akl\u0131m\u0131za gelmeyen \u015fark\u0131 isimlerini m\u0131r\u0131ldan\u0131nca \u00e7at diye bulan bir program yap\u0131n.Ziyan oldum.","source":"\u003ca href="http://twitter.com/#!/download/ipad" rel="nofollow"\u003eTwitter for iPad\u003c/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":592178615,"id_str":"592178615","name":"Instagram\u00ae","screen_name":"Instagram_tr","location":"","description":"Burada Okuduklar\u0131n\u0131z \u00c7ok Farkl\u0131 Olacak. (Hi\u00e7bir Kurumla ilgisi yoktur.) \r\nReklam i\u00e7in; http://t.co/hS6dVuXGJ9","url":null,"entities":{"description":{"urls":[{"url":"http://t.co/hS6dVuXGJ9","expanded_url":"http://www.bomedya.com","display_url":"bomedya.com","indices":[87,109]}]}},"protected":false,"followers_count":134041,"friends_count":23,"listed_count":106,"created_at":"Sun May 27 22:07:54 +0000 2012","favourites_count":367,"utc_offset":10800,"time_zone":"Istanbul","geo_enabled":false,"verified":false,"statuses_count":7073,"lang":"tr","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http://a0.twimg.com/profile_background_images/344918034409724545/4b11627776ac202da6caccc2f6961c7b.jpeg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/344918034409724545/4b11627776ac202da6caccc2f6961c7b.jpeg","profile_background_tile":false,"profile_image_url":"http://a0.twimg.com/profile_images/2831760684/03862677af810b77e70356ad438bfb78_normal.png","profile_image_url_https":"https://si0.twimg.com/profile_images/2831760684/03862677af810b77e70356ad438bfb78_normal.png","profile_banner_url":"https://pbs.twimg.com/profile_banners/592178615/1371770047","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":219,"favorite_count":90,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"tr"},"retweet_count":219,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"Instagram_tr","name":"Instagram\u00ae","id":592178615,"id_str":"592178615","indices":[3,16]}]},"favorited":false,"retweeted":false,"lang":"tr"}],"search_metadata":{"completed_in":0.023,"max_id":360387655147614208,"max_id_str":"360387655147614208","next_results":"?max_id=360387652375162881&q=cat&count=5&include_entities=1","query":"cat","refresh_url":"?since_id=360387655147614208&q=cat&include_entities=1","count":5,"since_id":0,"since_id_str":"0"}}
how can i user multi twitter api keys?
I'm deploying to pagodabox and getting the following exception
Use of undefined constant CURL_HTTP_VERSION_1_1 - assumed 'CURL_HTTP_VERSION_1_1'
not sure what the right setting should be
I'm trying to fetch all statuses containing a certain hashtag for a contest.
$tweets = Twitter::getSearch([
'q' => '#ff', // using #ff for testing
'until' => '2014-06-07',
'rpp' => 100,
'result_type' => 'recent'
]);
In docs, it says we can specify a rpp
parameter to fetch up to 100 statuses. I tried it but unfortunately it doesn't retrieve more than 15 tweets at a time.
I also noticed there's a page
parameter so I guess I could loop and fetch all of them that way but still I'd like to request more than 15 at a time.
NB: I'm using until
to get all the entries up to a certain date. I'd like to specify a time but I didn't see anything about it in the API docs though.
Could somebody please tell me what is wrong that is preventing me to fetch 100 statuses in one request?
Thanks and have a nice weekend!
Hi, Mr. John. I got error when trying to initiate your package. It showed error like this:
ErrorException (E_UNKNOWN)
Undefined index: ttwitter::config
Open: /var/www/html/integration/vendor/thujohn/twitter/src/Thujohn/Twitter/Twitter.php
* Only for debugging
*/
private $debug;
private $log = [];
public function __construct($config = [], SessionStore $session)
{
if (is_array($config['ttwitter::config']))
{
$this->tconfig = $config['ttwitter::config'];
Hey there,
Since the newest composer update, the class gives me errors. Any idea how to fix this?
Class 'Thujohn\Twitter\tmhOAuth' not found
* I'm still on Laravel 4.0.
Hi, Mr. John, i got error when trying to initiate your package. It showed error like this :
ErrorException (E_UNKNOWN)
Undefined index: ttwitter::config
Open: /var/www/html/integration/vendor/thujohn/twitter/src/Thujohn/Twitter/Twitter.php
* Only for debugging
*/
private $debug;
private $log = [];
public function __construct($config = [], SessionStore $session)
{
if (is_array($config['ttwitter::config']))
{
$this->tconfig = $config['ttwitter::config'];
Not sure what is happening. No matter the length of the url or tweet message itself, it results in error 186 : Status is over 140 characters.
public function tweet($message = null)
{
$message = ($message) ? $message : 'Check out '. Str::limit($this->title, 10, '...') .'!';
$status = $message. ' '. URL::route('project', urlencode($this->title));
$status = Twitter::linkify($status);
return Twitter::postTweet(
array(
'status' => $status,
'format' => 'json'
)
);
}
What am I doing wrong?
Hi,
I am new on laravel. We will use Twitter::(method) in routes.php but i want use in controllers. How can i do that ? I searched injection somewhere for this but not found.
Thanks.
using Twitter::postTweetMedia()
results in the following JSON response:
{ "errors" : [ { "code" : 189 , "message" : "Error creating status." } ] }
My $tweet_opts
array that I pass into the function is constructed by using a string though:
$tweet_opts["media[]"] = '/path/to/file';
which is what I think the issue is. If I create a stream of the file like so:
$tweet_opts["media[]"] = fopen('/path/to/file', 'r');
then I get an exception from tmhOauth:
object(ErrorException)[281]
protected 'message' => string 'strpos() expects parameter 1 to be string, resource given' (length=57)
private 'string' (Exception) => string '' (length=0)
protected 'code' => int 0
protected 'file' => string '/Users/jonny/git/jbl4/vendor/themattharris/tmhoauth/tmhOAuth.php' (length=64)
protected 'line' => int 300
private 'trace' (Exception) =>
array (size=27)
0 =>
array (size=4)
'function' => string 'handleError' (length=11)
'class' => string 'Illuminate\Exception\Handler' (length=28)
'type' => string '->' (length=2)
'args' =>
array (size=5)
...
1 =>
array (size=4)
'file' => string '/Users/jonny/git/jbl4/vendor/themattharris/tmhoauth/tmhOAuth.php' (length=64)
'line' => int 300
'function' => string 'strpos' (length=6)
'args' =>
array (size=2)
...
2 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/themattharris/tmhoauth/tmhOAuth.php' (length=64)
'line' => int 355
'function' => string 'multipart_escape' (length=16)
'class' => string 'tmhOAuth' (length=8)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
3 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/themattharris/tmhoauth/tmhOAuth.php' (length=64)
'line' => int 561
'function' => string 'prepare_params' (length=14)
'class' => string 'tmhOAuth' (length=8)
'type' => string '->' (length=2)
'args' =>
array (size=0)
...
4 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/themattharris/tmhoauth/tmhOAuth.php' (length=64)
'line' => int 533
'function' => string 'oauth1_request' (length=14)
'class' => string 'tmhOAuth' (length=8)
'type' => string '->' (length=2)
'args' =>
array (size=0)
...
5 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/thujohn/twitter/src/Thujohn/Twitter/Twitter.php' (length=76)
'line' => int 45
'function' => string 'user_request' (length=12)
'class' => string 'tmhOAuth' (length=8)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
6 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/thujohn/twitter/src/Thujohn/Twitter/Twitter.php' (length=76)
'line' => int 288
'function' => string 'query' (length=5)
'class' => string 'Thujohn\Twitter\Twitter' (length=23)
'type' => string '->' (length=2)
'args' =>
array (size=4)
...
7 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php' (length=88)
'line' => int 208
'function' => string 'postTweetMedia' (length=14)
'class' => string 'Thujohn\Twitter\Twitter' (length=23)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
8 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/app/controllers/AdminController.php' (length=57)
'line' => int 296
'function' => string '__callStatic' (length=12)
'class' => string 'Illuminate\Support\Facades\Facade' (length=33)
'type' => string '::' (length=2)
'args' =>
array (size=2)
...
9 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/app/controllers/AdminController.php' (length=57)
'line' => int 296
'function' => string 'postTweetMedia' (length=14)
'class' => string 'Thujohn\Twitter\TwitterFacade' (length=29)
'type' => string '::' (length=2)
'args' =>
array (size=1)
...
10 =>
array (size=4)
'function' => string 'postNewNote' (length=11)
'class' => string 'AdminController' (length=15)
'type' => string '->' (length=2)
'args' =>
array (size=0)
...
11 =>
array (size=4)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Routing/Controller.php' (length=84)
'line' => int 231
'function' => string 'call_user_func_array' (length=20)
'args' =>
array (size=2)
...
12 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php' (length=94)
'line' => int 93
'function' => string 'callAction' (length=10)
'class' => string 'Illuminate\Routing\Controller' (length=29)
'type' => string '->' (length=2)
'args' =>
array (size=2)
...
13 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php' (length=94)
'line' => int 62
'function' => string 'call' (length=4)
'class' => string 'Illuminate\Routing\ControllerDispatcher' (length=39)
'type' => string '->' (length=2)
'args' =>
array (size=3)
...
14 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Routing/Router.php' (length=80)
'line' => int 930
'function' => string 'dispatch' (length=8)
'class' => string 'Illuminate\Routing\ControllerDispatcher' (length=39)
'type' => string '->' (length=2)
'args' =>
array (size=4)
...
15 =>
array (size=4)
'function' => string 'Illuminate\Routing\{closure}' (length=28)
'class' => string 'Illuminate\Routing\Router' (length=25)
'type' => string '->' (length=2)
'args' =>
array (size=0)
...
16 =>
array (size=4)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Routing/Route.php' (length=79)
'line' => int 105
'function' => string 'call_user_func_array' (length=20)
'args' =>
array (size=2)
...
17 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Routing/Router.php' (length=80)
'line' => int 996
'function' => string 'run' (length=3)
'class' => string 'Illuminate\Routing\Route' (length=24)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
18 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Routing/Router.php' (length=80)
'line' => int 964
'function' => string 'dispatchToRoute' (length=15)
'class' => string 'Illuminate\Routing\Router' (length=25)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
19 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php' (length=88)
'line' => int 738
'function' => string 'dispatch' (length=8)
'class' => string 'Illuminate\Routing\Router' (length=25)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
20 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php' (length=88)
'line' => int 708
'function' => string 'dispatch' (length=8)
'class' => string 'Illuminate\Foundation\Application' (length=33)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
21 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Session/Middleware.php' (length=84)
'line' => int 72
'function' => string 'handle' (length=6)
'class' => string 'Illuminate\Foundation\Application' (length=33)
'type' => string '->' (length=2)
'args' =>
array (size=3)
...
22 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php' (length=78)
'line' => int 47
'function' => string 'handle' (length=6)
'class' => string 'Illuminate\Session\Middleware' (length=29)
'type' => string '->' (length=2)
'args' =>
array (size=3)
...
23 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php' (length=78)
'line' => int 51
'function' => string 'handle' (length=6)
'class' => string 'Illuminate\Cookie\Queue' (length=23)
'type' => string '->' (length=2)
'args' =>
array (size=3)
...
24 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/stack/builder/src/Stack/StackedHttpKernel.php' (length=74)
'line' => int 23
'function' => string 'handle' (length=6)
'class' => string 'Illuminate\Cookie\Guard' (length=23)
'type' => string '->' (length=2)
'args' =>
array (size=3)
...
25 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php' (length=88)
'line' => int 606
'function' => string 'handle' (length=6)
'class' => string 'Stack\StackedHttpKernel' (length=23)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
26 =>
array (size=6)
'file' => string '/Users/jonny/git/jbl4/public/index.php' (length=38)
'line' => int 49
'function' => string 'run' (length=3)
'class' => string 'Illuminate\Foundation\Application' (length=33)
'type' => string '->' (length=2)
'args' =>
array (size=0)
...
private 'previous' (Exception) => null
protected 'severity' => int 2
public 'xdebug_message' => string '<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> ErrorException: strpos() expects parameter 1 to be string, resource given in /Users/jonny/git/jbl4/vendor/themattharris/tmhoauth/tmhOAuth.php on line <i>300</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Me'... (length=11085)
please , how can i use the parameters 'geocode' and 'until' (to get tweets posted until 2 dates) on getSerach function ?
I get this error for all queries. Something need to be updated after the migration to the API 1.1 ?
When using L5 the API always returns an error about the fact that SSL is required.
{#587
+"errors": array:1 [
0 => {#590
+"message": "SSL is required"
+"code": 92
}
]
}
When I manualy set the value of $this->default['use_ssl'] to true, a new error appears:
(Should never be enything else than true anyway)
{#20
+"errors": array:1 [
0 => {#579
+"message": "Sorry, that page does not exist"
+"code": 34
}
]
}
This error appears when collection Tweets via the method 'getUserTimeline'. But also on other methods. The cause of this problem can be found in the query method.
'url' => parent::url(Config::get('thujohn/twitter::API_VERSION').'/'.$name),
The config value can't be retrieved so '1.X' is missing from the url
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.