Comments (10)
Hi.
Did you try renaming the two aliases ? e.g. Jtwitter and Ptwitter
from twitter.
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.
I think I fixed it.
Can you try again with the two aliases ?
from twitter.
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.
I have the same and it works
from twitter.
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.
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.
ok let me keep trying :)
from twitter.
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.
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)
- Cant post thread
- twitter postTwitter method doesn't work in laravel 9 HOT 1
- Media not uploaded
- getTweet() params not work for ApiV1
- Not installable with Laravel 9.38.0 HOT 3
- How to get tweets with more than 1000 likes?
- will be used.
- Instructions for login via v2? HOT 7
- Unable to install the package with Laravel 9.x HOT 1
- Issue with composer require atymic/twitter "3.1.16"
- How can i use this API end point `POST /2/tweets`
- v2 api getListSubscriptions?
- Error: When authenticating requests to the Twitter API v2 endpoints, you must use keys and to (truncated...) HOT 4
- Laravel 10 php 8.1 HOT 1
- No publishable resources for tag [] HOT 4
- Non static method issue HOT 3
- Different Package HOT 1
- Twitter::forAPIV2 post tweet not work HOT 1
- Laravel 11 support
- Support for nesbot/carbon 3 ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitter.