Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Twitter Client Laravel Package

desarrolla2/twitter-client

Independent PHP Twitter client for fetching a user’s tweets via RSS. Supports simple usage or optional caching through desarrolla2/cache and RSSClient. Install via Composer, set a screen name, and fetch recent tweets quickly.

View on GitHub
Deep Wiki
Context7

TwitterClient

Build Status

A independent Twitter Client library. This library depends from RSSClient

Installation

With Composer

It is best installed it through packagist by including desarrolla2/twitter-client in your project composer.json require:

    "require": {
        // ...
        "desarrolla2/twitter-client":  "dev-master"
    }

Without Composer

You can also download it from [Github] (https://github.com/desarrolla2/TwitterClient), but no autoloader is provided so you'll need to register it with your own PSR-0 compatible autoloader.

Usage

Without Cache

This example does not use any cache, so it probably will be too slow to be used on a website, you should implement your system cache, or use the cache system described below

    <?php

    use Desarrolla2\TwitterClient\TwitterClient;

    $client = new TwitterClient();
    $client->setScreenName('desarrolla2');

    $twits = $client->fetch(10);

With Cache

This example uses the cache implemented by Seller desarrolla2/cache you must select the adapter depending on your needs, you can find all the info in the repository [Github] (https://github.com/desarrolla2/Cache).

    <?php

    use Desarrolla2\TwitterClient\TwitterClient;
    use Desarrolla2\RSSClient\RSSCacheClient;
    use Desarrolla2\Cache\Cache;
    use Desarrolla2\Cache\Adapter\NotCache;

    // It is important that you select and configure your cache adapter
    $rssCacheClient = new RSSCacheClient(new Cache(new File('/tmp')));

    $client = new TwitterClient(rssCacheClient);
    $client->setScreenName('desarrolla2');

    $twits = $client->fetch(10);

You can see how to configure desarrolla2/cache in its [README] (https://github.com/desarrolla2/Cache)

Contact

You can contact with me on twitter.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
cadot.eu/make
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky