Skip to content

Commit

Permalink
Change connection to fit new twitteoauth
Browse files Browse the repository at this point in the history
  • Loading branch information
ymihaylov committed Feb 17, 2015
1 parent 8e8869b commit cc838b6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/Despark/LaravelSocialFeeder/SocialFeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ class SocialFeeder {

public static function updateTwitterPosts()
{
$connection = new \TwitterOAuth(
Config::get('laravel-social-feeder::twitterCredentials.consumerKey'),
Config::get('laravel-social-feeder::twitterCredentials.consumerSecret'),
Config::get('laravel-social-feeder::twitterCredentials.accessToken'),
Config::get('laravel-social-feeder::twitterCredentials.accessTokenSecret')
);

$connection->host = Config::get('laravel-social-feeder::twitterCredentials.host');
$connection = new \Abraham\TwitterOAuth\TwitterOAuth(
Config::get('laravel-social-feeder::twitterCredentials.consumerKey'),
Config::get('laravel-social-feeder::twitterCredentials.consumerSecret'),
Config::get('laravel-social-feeder::twitterCredentials.accessToken'),
Config::get('laravel-social-feeder::twitterCredentials.accessTokenSecret')
);

$params = array(
'screen_name' => Config::get('laravel-social-feeder::twitterCredentials.screen_name'),
Expand All @@ -33,7 +31,7 @@ public static function updateTwitterPosts()

try
{
$tweets = $connection->get('/statuses/user_timeline.json?'.http_build_query($params));
$tweets = $connection->get('statuses/user_timeline', $params);
}
catch (Exception $e)
{
Expand Down

0 comments on commit cc838b6

Please sign in to comment.