- How do I install thujohn/twitter in a Laravel application?
- Install the package with Composer and publish its configuration file if the release includes one. In older Laravel versions you may need to register the service provider and Twitter facade alias manually, so check the package README for exact class names. Put your Twitter consumer keys, access token, and secrets in environment variables rather than committed config.
- Does thujohn/twitter support Twitter API v2?
- The package is described as wrapping Twitter API v1.1 endpoints, not API v2. Do not assume support for v2 resources, typed response objects, webhooks, or streaming. Run a small spike against the exact release you install to confirm which endpoints are available before committing to it.
- Which Laravel and PHP versions does thujohn/twitter support?
- The provided context does not specify Composer constraints, so verify the package's composer.json against your target Laravel and PHP versions. Test service-provider auto-discovery and facade alias behavior on that version rather than assuming they work. Legacy Laravel applications may require manual provider and alias registration.
- How do I configure Twitter API credentials for thujohn/twitter?
- Publish the package config file and supply the consumer key, consumer secret, access token, and access token secret through environment variables. Rebuild Laravel's config cache after changing credentials, especially in production. Confirm whether the package expects OAuth 1.0a user-context credentials for the endpoints you plan to call.
- Does thujohn/twitter use OAuth 1.0a or OAuth 2.0?
- The package is described as offering OAuth authentication for legacy Twitter API v1.1 calls, which typically means OAuth 1.0a user context. It is not documented here as supporting OAuth 2.0 bearer tokens or client-credentials flows. Verify the authentication method against your Twitter app permissions before building write operations.
- How do I post a tweet with thujohn/twitter?
- After configuring credentials, use the Twitter facade method documented by the package for posting a status or tweet. Method names and parameters can vary by release, so confirm the signature in the installed source or README. Test against a non-production account first because write permissions and API tier rules apply.
- Can I mock or test the Twitter facade in Laravel?
- The facade creates a hidden static dependency, so wrap it behind an internal TwitterClient interface and mock that interface in tests. If you replace the wrapper with direct HTTP calls, Laravel's HTTP client fakes can cover request and response behavior. Avoid relying only on facade swapping in large test suites.
- Is thujohn/twitter still maintained and safe for production?
- Maintenance is uncertain because repository provenance is unknown and the package targets legacy API v1.1 despite a recent release date. Treat it as high risk for production and verify release history, tests, open issues, and endpoint coverage. If you use it, isolate it behind an adapter and document a fallback to direct HTTP calls.
- What are alternatives to thujohn/twitter for Laravel?
- For greenfield Laravel applications, the native Laravel HTTP client with direct Twitter API v2 calls is often a better default. It keeps authentication, retries, rate limits, and response parsing explicit and avoids an extra dependency. If you need typed API v2 resources or streaming, choose a maintained API v2 client instead.
- How does thujohn/twitter handle rate limits and API errors?
- The package is a thin wrapper, so it abstracts HTTP boilerplate but not Twitter's rate-limit model or platform policy. Confirm how your installed version surfaces HTTP errors, rate-limit headers, and retries. Add monitoring, backoff, and application-level error handling around Twitter calls.