Giter Site home page Giter Site logo

Comments (10)

thujohn avatar thujohn commented on August 20, 2024

Hi.

Did you try renaming the two aliases ? e.g. Jtwitter and Ptwitter

from twitter.

nrs365 avatar nrs365 commented on August 20, 2024

I tried renaming the aliases, and stackoverflow/stacktrace and logs. Can't get the two working even after changing the aliases because the namespaces are the same. Ideas?

from twitter.

thujohn avatar thujohn commented on August 20, 2024

I think I fixed it.

Can you try again with the two aliases ?

from twitter.

nrs365 avatar nrs365 commented on August 20, 2024

I did a composer update and the two packages still have a namespace conflict. Here is an example of how I'm trying to use the two packages together:

public function showHome()
{
$tweets = ThujohnTwitter::getUserTimeline(array('screen_name' => '210axs', 'count' => 1, 'format' => 'array'));
$name = ($tweets[0]['user']['name']);
$statuses_count = ($tweets[0]['user']['statuses_count']);
$profile_image = ($tweets[0]['user']['profile_image_url_https']);
dd($tweets);
$data = [
'user' => $user,
'name' => $name,
'statuses_count' => $statuses_count,
'profile_image' => $profile_image
];
dd($data);
//return View::make('index')->with($data);
}

public function oauth() {
    // Reqest tokens
    $tokens = PhiloTwitter::oAuthRequestToken();

    // Redirect to twitter
    PhiloTwitter::oAuthAuthenticate(array_get($tokens, 'oauth_token'));
    exit;
}

public function callback() {
    //Oauth token
    $token = Input::get('oauth_token');

    // Verifier token
    $verifier = Input::get('oauth_verifier');

    // Request access token
    $accessToken = PhiloTwitter::oAuthAccessToken($token, $verifier);
    dd($accessToken);
    $twitterId = $accessToken['user_id'];
    $twitterUsername = $accessToken['screen_name'];
    $twitterToken = $accessToken['oauth_token'];
    $twitterTokenSecret = $accessToken['oauth_token_secret'];

} 

from twitter.

thujohn avatar thujohn commented on August 20, 2024

I have the same and it works

from twitter.

nrs365 avatar nrs365 commented on August 20, 2024

I'm testing it with both packages and my alias are written like this:

'PhiloTwitter' => 'Philo\Twitter\Facades\Twitter',
'ThujohnTwitter' => 'Thujohn\Twitter\TwitterFacade',

And when I try to use the PhiloTwitter package it says it's looking for the PhiloTwitter Oauth method in ThujohnTwitter "Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR)
Call to undefined method Thujohn\Twitter\Twitter::oAuthRequestToken()"

from twitter.

thujohn avatar thujohn commented on August 20, 2024

I created a new project with only this and it works : http://laravel.io/bin/kkBBm

Maybe you should try in a new project too.

from twitter.

nrs365 avatar nrs365 commented on August 20, 2024

ok let me keep trying :)

from twitter.

nrs365 avatar nrs365 commented on August 20, 2024

I started using the updated version of the package with the new oauth functions. It's working really well :) It solves the problem I was having because now I only have to use one package for everything. Thanks!

from twitter.

j3j5 avatar j3j5 commented on August 20, 2024

I'm glad somebody else found it useful. This is a great package but I really was missing the functions needed to handle login with Twitter. Let me know if you find any issue, I'll be happy to help.

from twitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.