atymic / twitter

Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x
https://atymic.dev
MIT License
922 stars 290 forks source link

How to get this working in Laravel 8 #375

Closed karsvaniersel closed 3 years ago

karsvaniersel commented 3 years ago

So I followed the readme but I keep getting erros and I cannot do an actual call. Such as Call to undefined method Atymic\Twitter\Facade\Twitter::getUserTimeline() or undefined method on Twitter.

Am I missing something? Or is there a hidden wiki somewhere?

Thanks in advance!

seanlunar commented 3 years ago

using latest version always bring that error, mine i fixed this but downgrading to version 2 ! you might aswell consider doing that

reliq commented 3 years ago

Hi @karsvaniersel, please note that getUserTimeline() is an API v1.1 method.

An error such as that indicates that you may be trying to call this method from a facade instance configured for API v2.


Please try the following options:

  1. Ensure that the package is configured to use API v2 in your .env file by following the setup and installation guide. Pay special attention to TWITTER_API_VERSION=?, you are trying to use a v1.1 method so this should be set like TWITTER_API_VERSION=1.1.
  2. Call the api v1 method after a call to forApiV1() e.g. Atymic\Twitter\Facade\Twitter::forApiV1()->getUserTimeline()
reliq commented 3 years ago

Closing this due to inactivity.