jeudi 20 août 2015

How to post tweets to multiple users accounts in laravel?

Im using this package http://ift.tt/1K4ObA3 to authorize users. I am able to authorize multiple users and get their data from twitter. I am struggling to post tweets to multiple users twitter accounts. Everytime I try to post it will only tweet to 1 users account. How can I post to multiple users accounts after authorization?

Here is the code I have tried. I save the user's tokens in the database and then grab it and put it in the session. :

Route::get('tweet', function(){
        $token = Input::get( 'oauth_token' );
        $verify = Input::get( 'oauth_verifier' );
        $screen_name = DB::table('profiles')->where('oauth_token', $token)->pluck('screen_name');
        $tweet_text = Input::get('tweet_text');

        Session::put('oauth_request_token', $token);
        Session::put('oauth_request_token_secret', $verify);
        Session::get('oauth_request_token');
        Session::get('oauth_request_token_secret');


        dd( Twitter::postTweet(['status' => $tweet_text, 'format' => 'json']) );

});

laravel php laravel 5 laravel 4 laravel with laravel tutorial

Aucun commentaire:

Enregistrer un commentaire