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 Php Laravel Package

dg/twitter-php

dg/twitter-php is a lightweight PHP library for the Twitter API, providing simple OAuth authentication and helpers for sending requests, posting tweets, and fetching timelines, user data, and more. Easy to integrate in Laravel or any PHP app.

View on GitHub
Deep Wiki
Context7
v5.0.0
  • new namespace DG\X with Client class
  • uses X API v2 endpoints
  • uses Guzzle HTTP client (replaces raw CURL)
  • simplified inline OAuth 1.0a
  • clean API: sendTweet(), deleteTweet(), getTweet(), getMyTweets(), getTimeline(), getMentions(), search(), getUser(), getUserById(), getFollowers(), follow(), sendDirectMessage()
  • PHPStan level 8
  • Nette Tester tests
  • requires PHP 8.2+
v3.7

Please make a donation at https://nette.org/make-donation?to=twitter-php

  • minimal required PHP version changed to 5.4
  • Twitter::send() added $options
  • Twitter::clickable() now works only with statuses and entites
  • fixed coding style
v3.6
  • added loadUserFollowersList() and sendDirectMessage()
  • Twitter::send() allows to upload multiple images
  • changed http:// to https://
v3.5
  • allows to send message starting with @ and upload file at the same time in PHP >= 5.5
v3.4
  • cache expiration can be specified as string (ie '30 minutes')
  • fixed some bugs
v3.3
  • Twitter::send($status, $image) can upload image
  • added Twitter::follow()
v2.0
  • added support for OAuth authentication protocol
  • added Twitter::clickable() which makes links, @usernames and #hashtags clickable
  • installable via composer require dg/twitter-php
v3.0
  • updated to Twitter API 1.1. Some stuff deprecated by Twitter was removed:
    • removed RSS, ATOM and XML support
    • removed Twitter::ALL
    • Twitter::load() - removed third argument $page
    • Twitter::search() requires authentication and returns different structure
  • removed shortening URL using http://is.gd
  • changed order of Twitter::request() arguments to $resource, $method, $data
v3.1
  • Twitter::load() - added third argument $data
  • Twitter::clickable() uses entities; pass as parameter status object, not just text
  • added Twitter::$httpOptions for custom cURL configuration
v3.2
  • Twitter API uses SSL OAuth
  • Twitter::clickable() supports media
  • added Twitter::loadUserInfoById() and loadUserFollowers()
  • fixed Twitter::destroy()
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
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