PHP Class TijsVerkoyen\Twitter\Twitter

Author: Tijs Verkoyen ([email protected])
Datei anzeigen Open project: tijsverkoyen/twitteroauth Class Usage Examples

Protected Properties

Property Type Description
$consumerKey string The consumer key
$consumerSecret string The consumer secret
$curl resource A cURL instance
$oAuthToken string The oAuth-token
$oAuthTokenSecret string The oAuth-token-secret
$returnAsArray boolean The response should be cast as array or not
$timeOut integer The timeout
$userAgent string The user agent

Public Methods

Method Description
__construct ( string $consumerKey, string $consumerSecret ) Default constructor
__destruct ( ) Default destructor
accountRemoveProfileBanner ( ) : boolean Removes the uploaded profile banner for the authenticating user.
accountSettings ( ) : array Returns settings (including current trend, geo and sleep time information) for the authenticating user.
accountSettingsUpdate ( string[optional] $trendLocationWoeId = null, bool[optional] $sleepTimeEnabled = null, string[optional] $startSleepTime = null, string[optional] $endSleepTime = null, string[optional] $timeZone = null, string[optional] $lang = null ) : array Updates the authenticating user's settings.
accountUpdateDeliveryDevice ( string $device, bool[optional] $includeEntities = null ) : array Sets which device Twitter delivers updates to for the authenticating user. Sending none as the device parameter will disable SMS updates.
accountUpdateProfile ( string[optional] $name = null, string[optional] $url = null, string[optional] $location = null, string[optional] $description = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Sets values that users are able to set under the "Account" tab of their settings page. Only the parameters specified will be updated.
accountUpdateProfileBackgroundImage ( string $image, bool[optional] $tile = false, bool[optional] $includeEntities = null ) : array Updates the authenticating user's profile background image.
accountUpdateProfileBanner ( ) Not implemented yet
accountUpdateProfileColors ( string[optional] $profileBackgroundColor = null, string[optional] $profileTextColor = null, string[optional] $profileLinkColor = null, string[optional] $profileSidebarFillColor = null, string[optional] $profileSidebarBorderColor = null, bool[optional] $includeEntities = null ) : array Sets one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com.
accountUpdateProfileImage ( string $image, bool[optional] $includeEntities = null ) : array Updates the authenticating user's profile image.
accountVerifyCredentials ( bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not. Use this method to test if supplied user credentials are valid.
applicationRateLimitStatus ( array $resources = null ) : string Returns the current rate limits for methods belonging to the specified resource families.
blocksCreate ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless retweeted by another user). If a follow or friend relationship exists it is destroyed.
blocksDestroy ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Un-blocks the user specified in the ID parameter for the authenticating user. Returns the un-blocked user in the requested format when successful. If relationships existed before the block was instated, they will not be restored.
blocksIds ( string[optional] $cursor = null, bool[optional] $stringifyIds = null ) : array Returns an array of numeric user ids the authenticating user is blocking.
blocksList ( int[optional] $cursor = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Not implemented yet
directMessages ( string[optional] $sinceId = null, string[optional] $maxId = null, int[optional] $count = null, int[optional] $page = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Returns the 20 most recent direct messages sent to the authenticating user. Includes detailed information about the sender and recipient user. You can request up to 200 direct messages per call, up to a maximum of 800 incoming DMs.
directMessagesDestroy ( string $id, bool[optional] $includeEntities = null ) : array Destroys the direct message specified in the required ID parameter. The authenticating user must be the recipient of the specified direct message.
directMessagesNew ( string[optional] $userId = null, string[optional] $screenName = null, string $text ) : array Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters and must be a POST. Returns the sent message in the requested format if successful.
directMessagesSent ( string[optional] $sinceId = null, string[optional] $maxId = null, int[optional] $count = null, int[optional] $page = null, bool[optional] $includeEntities = null ) : array Returns the 20 most recent direct messages sent by the authenticating user. Includes detailed information about the sender and recipient user. You can request up to 200 direct messages per call, up to a maximum of 800 outgoing DMs.
directMessagesShow ( string $id ) : array
favoritesCreate ( string $id, bool[optional] $includeEntities = null ) : array Favorites the status specified in the ID parameter as the authenticating user. Returns the favorite status when successful.
favoritesDestroy ( string $id, bool[optional] $includeEntities = null ) : array Un-favorites the status specified in the ID parameter as the authenticating user. Returns the un-favorited status in the requested format when successful.
favoritesList ( string[otpional] $userId = null, string[otpional] $screenName = null, int[optional] $count = 20, string[otpional] $sinceId = null, string[otpional] $maxId = null, bool[optional] $includeEntities = null ) : array Returns the 20 most recent Tweets favorited by the authenticating or specified user.
followersIds ( string[optional] $userId = null, string[optional] $screenName = null, string[optional] $cursor = null, bool[optional] $stringifyIds = true ) : array Returns a cursored collection of user IDs for every user following the specified user.
followersList ( string[optional] $userId = null, string[optional] $screenName = null, int[optional] $cursor = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Returns a cursored collection of user objects for users following the specified user.
friendsIds ( string[optional] $userId = null, string[optional] $screenName = null, string[optional] $cursor = null, bool[optional] $stringifyIds = null ) : array Returns a cursored collection of user IDs for every user the specified user is following (otherwise known as their "friends").
friendsList ( string[optional] $userId = null, string[optional] $screenName = null, int[optional] $cursor = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
friendshipsCreate ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $follow = false ) : array Allows the authenticating users to follow the user specified in the ID parameter.
friendshipsDestroy ( string[optional] $userId = null, string[optional] $screenName = null ) : array Allows the authenticating user to unfollow the user specified in the ID parameter.
friendshipsIncoming ( string[optional] $cursor = null, bool[optional] $stringifyIds = true ) : array Returns a collection of numeric IDs for every user who has a pending request to follow the authenticating user.
friendshipsLookup ( mixed[optional] $userIds = null, mixed[optional] $screenNames = null ) : array Returns the relationships of the authenticating user to the comma-separated list of up to 100 screen_names or user_ids provided.
friendshipsOutgoing ( string[optional] $cursor = null, bool[optional] $stringifyIds = true ) : array Returns a collection of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
friendshipsShow ( string[optional] $sourceId = null, string[optional] $sourceScreenName = null, string[optional] $targetId = null, string[optional] $targetScreenName = null ) : array Returns detailed information about the relationship between two arbitrary users.
friendshipsUpdate ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $device = null, bool[optional] $retweets = null ) : array Allows one to enable or disable retweets and device notifications from the specified user.
geoId ( string $id ) : array Returns all the information about a known place.
geoPlace ( string $name, string $containedWithin, string $token, float $lat, float $long, array $attributes = null ) : array Creates a new place at the given latitude and longitude.
geoReverseGeoCode ( float $lat, float $long, string[optional] $accuracy = null, string[optional] $granularity = null, int[optional] $maxResults = null ) : array Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updating a status.
geoSearch ( float[optional] $lat = null, float[optional] $long = null, string[optional] $query = null, string[optional] $ip = null, string[optional] $granularity = null, string[optional] $accuracy = null, int[optional] $maxResults = null, string[optional] $containedWithin = null, array $attributes = null ) : array Search for places that can be attached to a statuses/update. Given a latitude and a longitude pair, an IP address, or a name, this request will return a list of all the valid places that can be used as the place_id when updating a status.
geoSimilarPlaces ( float $lat, float $long, string $name, string[optional] $containedWithin = null, array $attributes = null ) : array Locates places near the given coordinates which are similar in name.
getTimeOut ( ) : integer Get the timeout
getUserAgent ( ) : string Get the useragent that will be used. Our version will be prepended to yours.
helpConfiguration ( ) : array Returns the current configuration used by Twitter including twitter.com slugs which are not usernames, maximum photo resolutions, and t.co URL lengths.
helpLanguages ( ) : array Returns the list of languages supported by Twitter along with their ISO 639-1 code. The ISO 639-1 code is the two letter value to use if you include lang with any of your requests.
helpPrivacy ( ) : array Returns Twitter's Privacy Policy
helpTos ( ) : array Returns the Twitter Terms of Service in the requested format. These are not the same as the Developer Rules of the Road.
listSubscriptions ( ) Not implemented yet
listsCreate ( ) Not implemented yet
listsDestroy ( ) Not implemented yet
listsList ( ) Not implemented yet
listsMembers ( ) Not implemented yet
listsMembersCreate ( ) Not implemented yet
listsMembersCreateAll ( ) Not implemented yet
listsMembersDestroy ( ) Not implemented yet
listsMembersDestroyAll ( ) Not implemented yet
listsMembersShow ( ) Not implemented yet
listsMemberships ( ) Not implemented yet
listsShow ( ) Not implemented yet
listsStatuses ( ) Not implemented yet
listsSubscribers ( ) Not implemented yet
listsSubscribersCreate ( ) Not implemented yet
listsSubscribersDestroy ( ) Not implemented yet
listsSubscribersShow ( ) Not implemented yet
listsUpdate ( ) Not implemented yet
oAuthAccessToken ( string $token, string $verifier ) : array Allows a Consumer application to exchange the OAuth Request Token for an OAuth Access Token.
oAuthAuthenticate ( string $token, bool[optional] $force = false, string[optional] $screen_name = false ) Allows a Consumer application to use an OAuth request_token to request user authorization.
oAuthAuthorize ( string $token ) Will redirect to the page to authorize the applicatione
oAuthRequestToken ( string[optional] $callbackURL = null ) : array Allows a Consumer application to obtain an OAuth Request Token to request user authorization.
reportSpam ( string[optional] $screenName = null, string[optional] $userId = null ) : array The user specified in the id is blocked by the authenticated user and reported as a spammer.
savedSearchesCreate ( string $query ) : array Create a new saved search for the authenticated user. A user may only have 25 saved searches.
savedSearchesDestroy ( string $id ) : array Destroys a saved search for the authenticating user. The authenticating user must be the owner of saved search id being destroyed.
savedSearchesList ( ) : array Returns the authenticated user's saved search queries.
savedSearchesShow ( string $id ) : array Retrieve the information for the saved search represented by the given id. The authenticating user must be the owner of saved search ID being requested.
searchTweets ( string $q, string[optional] $geocode = null, string[optional] $lang = null, string[optional] $locale = null, string[optional] $resultType = null, int[optional] $count = null, string[optional] $until = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $includeEntities = null ) : array Returns tweets that match a specified query.
setOAuthToken ( string $token ) Set the oAuth-token
setOAuthTokenSecret ( string $secret ) Set the oAuth-secret
setTimeOut ( integer $seconds ) Set the timeout
setUserAgent ( string $userAgent ) Get the useragent that will be used. Our version will be prepended to yours.
site ( ) Not implemented yet
statusesDestroy ( string $id, bool[optional] $trimUser = null ) : array Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status. Returns the destroyed status if successful.
statusesFilter ( ) Not implemented yet
statusesFirehose ( ) Not implemented yet
statusesHomeTimeline ( int[optional] $count = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $excludeReplies = null, bool[optional] $contributorDetails = null, bool[optional] $includeEntities = null ) : array Returns the 20 most recent statuses, including retweets if they exist, posted by the authenticating user and the user's they follow. This is the same timeline seen by a user when they login to twitter.com.
statusesMentionsTimeline ( int[optional] $count = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $contributorDetails = null, bool[optional] $includeEntities = null ) : array Returns the 20 most recent mentions (tweets containing a users's @screen_name) for the authenticating user.
statusesOEmbed ( string[optional] $id = null, string[optional] $url = null, int[optional] $maxwidth = null, bool[optional] $hideMedia = null, bool[optional] $hideThread = null, bool[optional] $omitScript = null, string[optional] $align = null, string[optional] $related = null, string[optional] $lang = null ) : array
statusesRetweet ( string $id, bool[optional] $trimUser = null ) : array Retweets a tweet. Returns the original tweet with retweet details embedded.
statusesRetweets ( string $id, int[optional] $count = null, bool[optional] $trimUser = null ) : array Returns up to 100 of the first retweets of a given tweet.
statusesRetweetsOfMe ( int[optional] $count = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $includeEntities = null, bool[optional] $includeUserEntities = null ) : array Returns the most recent tweets authored by the authenticating user that have recently been retweeted by others. This timeline is a subset of the user's GET statuses/user_timeline.
statusesSample ( ) Not implemented yet
statusesShow ( string $id, bool[optional] $trimUser = null, bool[optional] $includeMyRetweet = null, bool[optional] $includeEntities = null ) : array Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the tweet.
statusesUpdate ( string $status, string[optional] $inReplyToStatusId = null, float[optional] $lat = null, float[optional] $long = null, string[optional] $placeId = null, bool[optional] $displayCoordinates = null, bool[optional] $trimUser = null ) : array Updates the authenticating user's status. A status update with text identical to the authenticating user's text identical to the authenticating user's current status will be ignored to prevent duplicates.
statusesUpdateWithMedia ( ) Not implemented yet
statusesUserTimeline ( string[optional] $userId = null, string[optional] $screenName = null, string[optional] $sinceId = null, int[optional] $count = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $excludeReplies = null, bool[optional] $contributorDetails = null, bool[optional] $includeRts = null ) : array Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.
trendsAvailable ( float[optional] $lat = null, float[optional] $long = null ) : array Returns the locations that Twitter has trending topic information for.
trendsClosest ( float[optional] $lat = null, float[optional] $long = null ) : array Returns the locations that Twitter has trending topic information for, closest to a specified location.
trendsPlace ( string $id, string[optional] $exclude = null ) : array Returns the top 10 trending topics for a specific WOEID, if trending information is available for it.
user ( ) Not implemented yet
usersContributees ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Returns a collection of users that the specified user can "contribute" to.
usersContributors ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array Returns a collection of users who can contribute to the specified account.
usersLookup ( mixed[optional] $userIds = null, mixed[optional] $screenNames = null, bool[optional] $includeEntities = null ) : array Returns fully-hydrated user objects for up to 100 users per request, as specified by comma-separated values passed to the user_id and/or screen_name parameters.
usersProfileBanner ( string[optional] $userId = null, string[optional] $screenName = null ) : array Returns a map of the available size variations of the specified user's profile banner. If the user has not uploaded a profile banner, a HTTP 404 will be served instead.
usersSearch ( string $q, int[optional] $page = null, int[optional] $count = null, bool[optional] $includeEntities = null ) : array Run a search for users similar to the Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this API.
usersShow ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null ) : array Returns a variety of information about the user specified by the required user_id or screen_name parameter.
usersSuggestions ( string[optional] $lang = null ) : array Access to Twitter's suggested user list. This returns the list of suggested user categories. The category can be used in usersSuggestionsSlug to get the users in that category.
usersSuggestionsSlug ( string $slug, string[optional] $lang = null ) : array Access the users in a given category of the Twitter suggested user list.
usersSuggestionsSlugMembers ( string $slug ) : array Access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user.

Protected Methods

Method Description
buildQuery ( array $parameters ) : string Format the parameters as a querystring
calculateBaseString ( string $url, string $method, array $parameters ) : string All OAuth 1.0 requests use the same basic algorithm for creating a signature base string and a signature. The signature base string is composed of the HTTP method being used, followed by an ampersand ("&") and then the URL-encoded base URL being accessed, complete with path (but not query parameters), followed by an ampersand ("&"). Then, you take all query parameters and POST body parameters (when the POST body is of the URL-encoded type, otherwise the POST body is ignored), including the OAuth parameters necessary for negotiation with the request at hand, and sort them in lexicographical order by first parameter name and then parameter value (for duplicate parameters), all the while ensuring that both the key and the value for each parameter are URL encoded in isolation. Instead of using the equals ("=") sign to mark the key/value relationship, you use the URL-encoded form of "%3D". Each parameter is then joined by the URL-escaped ampersand sign, "%26".
calculateHeader ( array $parameters, string $url ) : string Build the Authorization header
doCall ( string $url, array $parameters = null, bool[optional] $authenticate = false, bool[optional] $method = 'GET', string[optional] $filePath = null, bool[optional] $expectJSON = true, bool[optional] $returnHeaders = false ) : string Make the call
doOAuthCall ( string $method, array $parameters = null ) : array Make an call to the oAuth
getConsumerKey ( ) : string Get the consumer key
getConsumerSecret ( ) : string Get the consumer secret
getOAuthToken ( ) : string Get the oAuth-token
getOAuthTokenSecret ( ) : string Get the oAuth-token-secret
hmacsha1 ( string $key, string $data ) : string Build the signature for the data
setConsumerKey ( string $key ) Set the consumer key
setConsumerSecret ( string $secret ) Set the consumer secret
setReturnAsArray ( boolean $value ) Set the response type
urlencode_rfc3986 ( mixed $value ) : string URL-encode method for internal use

Method Details

__construct() public method

Default constructor
public __construct ( string $consumerKey, string $consumerSecret )
$consumerKey string The consumer key to use.
$consumerSecret string The consumer secret to use.

__destruct() public method

Default destructor
public __destruct ( )

accountRemoveProfileBanner() public method

Removes the uploaded profile banner for the authenticating user.

accountSettings() public method

Returns settings (including current trend, geo and sleep time information) for the authenticating user.
public accountSettings ( ) : array
return array

accountSettingsUpdate() public method

Updates the authenticating user's settings.
public accountSettingsUpdate ( string[optional] $trendLocationWoeId = null, bool[optional] $sleepTimeEnabled = null, string[optional] $startSleepTime = null, string[optional] $endSleepTime = null, string[optional] $timeZone = null, string[optional] $lang = null ) : array
$trendLocationWoeId string[optional]
$sleepTimeEnabled bool[optional]
$startSleepTime string[optional]
$endSleepTime string[optional]
$timeZone string[optional]
$lang string[optional]
return array

accountUpdateDeliveryDevice() public method

Sets which device Twitter delivers updates to for the authenticating user. Sending none as the device parameter will disable SMS updates.
public accountUpdateDeliveryDevice ( string $device, bool[optional] $includeEntities = null ) : array
$device string Must be one of: sms, none.
$includeEntities bool[optional]
return array

accountUpdateProfile() public method

Sets values that users are able to set under the "Account" tab of their settings page. Only the parameters specified will be updated.
public accountUpdateProfile ( string[optional] $name = null, string[optional] $url = null, string[optional] $location = null, string[optional] $description = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$name string[optional]
$url string[optional]
$location string[optional]
$description string[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

accountUpdateProfileBackgroundImage() public method

Updates the authenticating user's profile background image.
public accountUpdateProfileBackgroundImage ( string $image, bool[optional] $tile = false, bool[optional] $includeEntities = null ) : array
$image string The path to the background image for the profile. Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forceably scaled down.
$tile bool[optional]
$includeEntities bool[optional]
return array

accountUpdateProfileBanner() public method

Not implemented yet

accountUpdateProfileColors() public method

Each parameter's value must be a valid hexidecimal value, and may be either three or six characters (ex: #fff or #ffffff).
public accountUpdateProfileColors ( string[optional] $profileBackgroundColor = null, string[optional] $profileTextColor = null, string[optional] $profileLinkColor = null, string[optional] $profileSidebarFillColor = null, string[optional] $profileSidebarBorderColor = null, bool[optional] $includeEntities = null ) : array
$profileBackgroundColor string[optional]
$profileTextColor string[optional]
$profileLinkColor string[optional]
$profileSidebarFillColor string[optional]
$profileSidebarBorderColor string[optional]
$includeEntities bool[optional]
return array

accountUpdateProfileImage() public method

Updates the authenticating user's profile image.
public accountUpdateProfileImage ( string $image, bool[optional] $includeEntities = null ) : array
$image string The path to the avatar image for the profile. Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 500 pixels will be scaled down.
$includeEntities bool[optional]
return array

accountVerifyCredentials() public method

Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not. Use this method to test if supplied user credentials are valid.
public accountVerifyCredentials ( bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

applicationRateLimitStatus() public method

Each 1.1 API resource belongs to a "resource family" which is indicated in its method documentation. You can typically determine a method's resource family from the first component of the path after the resource version. This method responds with a map of methods belonging to the families specified by the resources parameter, the current remaining uses for each of those resources within the current rate limiting window, and its expiration time in epoch time. It also includes a rate_limit_context field that indicates the current access token context. You may also issue requests to this method without any parameters to receive a map of all rate limited GET methods. If your application only uses a few of methods, please explicitly provide a resources parameter with the specified resource families you work with.
public applicationRateLimitStatus ( array $resources = null ) : string
$resources array A comma-separated list of resource families you want to know the current rate limit disposition for. For best performance, only specify the resource families pertinent to your application.
return string

blocksCreate() public method

Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless retweeted by another user). If a follow or friend relationship exists it is destroyed.
public blocksCreate ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$userId string[optional]
$screenName string[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

blocksDestroy() public method

Un-blocks the user specified in the ID parameter for the authenticating user. Returns the un-blocked user in the requested format when successful. If relationships existed before the block was instated, they will not be restored.
public blocksDestroy ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$userId string[optional]
$screenName string[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

blocksIds() public method

Returns an array of numeric user ids the authenticating user is blocking.
public blocksIds ( string[optional] $cursor = null, bool[optional] $stringifyIds = null ) : array
$cursor string[optional]
$stringifyIds bool[optional]
return array

blocksList() public method

Not implemented yet
public blocksList ( int[optional] $cursor = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$cursor int[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

buildQuery() protected method

Format the parameters as a querystring
protected buildQuery ( array $parameters ) : string
$parameters array The parameters.
return string

calculateBaseString() protected method

All OAuth 1.0 requests use the same basic algorithm for creating a signature base string and a signature. The signature base string is composed of the HTTP method being used, followed by an ampersand ("&") and then the URL-encoded base URL being accessed, complete with path (but not query parameters), followed by an ampersand ("&"). Then, you take all query parameters and POST body parameters (when the POST body is of the URL-encoded type, otherwise the POST body is ignored), including the OAuth parameters necessary for negotiation with the request at hand, and sort them in lexicographical order by first parameter name and then parameter value (for duplicate parameters), all the while ensuring that both the key and the value for each parameter are URL encoded in isolation. Instead of using the equals ("=") sign to mark the key/value relationship, you use the URL-encoded form of "%3D". Each parameter is then joined by the URL-escaped ampersand sign, "%26".
protected calculateBaseString ( string $url, string $method, array $parameters ) : string
$url string The URL.
$method string The method to use.
$parameters array The parameters.
return string

calculateHeader() protected method

Build the Authorization header
protected calculateHeader ( array $parameters, string $url ) : string
$parameters array The parameters.
$url string The URL.
return string

directMessages() public method

Important: This method requires an access token with RWD (read, write & direct message) permissions. Consult The Application Permission Model for more information.
public directMessages ( string[optional] $sinceId = null, string[optional] $maxId = null, int[optional] $count = null, int[optional] $page = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$sinceId string[optional]
$maxId string[optional]
$count int[optional]
$page int[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

directMessagesDestroy() public method

Important: This method requires an access token with RWD (read, write & direct message) permissions. Consult The Application Permission Model for more information.
public directMessagesDestroy ( string $id, bool[optional] $includeEntities = null ) : array
$id string The ID of the direct message to delete.
$includeEntities bool[optional]
return array

directMessagesNew() public method

Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters and must be a POST. Returns the sent message in the requested format if successful.
public directMessagesNew ( string[optional] $userId = null, string[optional] $screenName = null, string $text ) : array
$userId string[optional]
$screenName string[optional]
$text string The text of your direct message. Be sure to URL encode as necessary, and keep the message under 140 characters.
return array

directMessagesSent() public method

Important: This method requires an access token with RWD (read, write & direct message) permissions. Consult The Application Permission Model for more information.
public directMessagesSent ( string[optional] $sinceId = null, string[optional] $maxId = null, int[optional] $count = null, int[optional] $page = null, bool[optional] $includeEntities = null ) : array
$sinceId string[optional]
$maxId string[optional]
$count int[optional]
$page int[optional]
$includeEntities bool[optional]
return array

directMessagesShow() public method

public directMessagesShow ( string $id ) : array
$id string The ID of the direct message.
return array

doCall() protected method

Make the call
protected doCall ( string $url, array $parameters = null, bool[optional] $authenticate = false, bool[optional] $method = 'GET', string[optional] $filePath = null, bool[optional] $expectJSON = true, bool[optional] $returnHeaders = false ) : string
$url string The url to call.
$parameters array
$authenticate bool[optional]
$method bool[optional]
$filePath string[optional]
$expectJSON bool[optional]
$returnHeaders bool[optional]
return string

doOAuthCall() protected method

Make an call to the oAuth
protected doOAuthCall ( string $method, array $parameters = null ) : array
$method string The method.
$parameters array
return array

favoritesCreate() public method

This process invoked by this method is asynchronous. The immediately returned status may not indicate the resultant favorited status of the tweet. A 200 OK response from this method will indicate whether the intended action was successful or not.
public favoritesCreate ( string $id, bool[optional] $includeEntities = null ) : array
$id string The numerical ID of the desired status.
$includeEntities bool[optional]
return array

favoritesDestroy() public method

This process invoked by this method is asynchronous. The immediately returned status may not indicate the resultant favorited status of the tweet. A 200 OK response from this method will indicate whether the intended action was successful or not.
public favoritesDestroy ( string $id, bool[optional] $includeEntities = null ) : array
$id string The numerical ID of the desired status.
$includeEntities bool[optional]
return array

favoritesList() public method

Returns the 20 most recent Tweets favorited by the authenticating or specified user.
public favoritesList ( string[otpional] $userId = null, string[otpional] $screenName = null, int[optional] $count = 20, string[otpional] $sinceId = null, string[otpional] $maxId = null, bool[optional] $includeEntities = null ) : array
$userId string[otpional]
$screenName string[otpional]
$count int[optional]
$sinceId string[otpional]
$maxId string[otpional]
$includeEntities bool[optional]
return array

followersIds() public method

At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 5,000 user IDs and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information. This method is especially powerful when used in conjunction with GET users/lookup, a method that allows you to convert user IDs into full user objects in bulk.
public followersIds ( string[optional] $userId = null, string[optional] $screenName = null, string[optional] $cursor = null, bool[optional] $stringifyIds = true ) : array
$userId string[optional]
$screenName string[optional]
$cursor string[optional]
$stringifyIds bool[optional]
return array

followersList() public method

At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
public followersList ( string[optional] $userId = null, string[optional] $screenName = null, int[optional] $cursor = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$userId string[optional]
$screenName string[optional]
$cursor int[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

friendsIds() public method

At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 5,000 user IDs and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information. This method is especially powerful when used in conjunction with GET users/lookup, a method that allows you to convert user IDs into full user objects in bulk.
public friendsIds ( string[optional] $userId = null, string[optional] $screenName = null, string[optional] $cursor = null, bool[optional] $stringifyIds = null ) : array
$userId string[optional]
$screenName string[optional]
$cursor string[optional]
$stringifyIds bool[optional]
return array

friendsList() public method

At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
public friendsList ( string[optional] $userId = null, string[optional] $screenName = null, int[optional] $cursor = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$userId string[optional]
$screenName string[optional]
$cursor int[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

friendshipsCreate() public method

Returns the befriended user in the requested format when successful. Returns a string describing the failure condition when unsuccessful. If you are already friends with the user a HTTP 403 may be returned, though for performance reasons you may get a 200 OK message even if the friendship already exists. Actions taken in this method are asynchronous and changes will be eventually consistent.
public friendshipsCreate ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $follow = false ) : array
$userId string[optional]
$screenName string[optional]
$follow bool[optional]
return array

friendshipsDestroy() public method

Returns the unfollowed user in the requested format when successful. Returns a string describing the failure condition when unsuccessful. Actions taken in this method are asynchronous and changes will be eventually consistent.
public friendshipsDestroy ( string[optional] $userId = null, string[optional] $screenName = null ) : array
$userId string[optional]
$screenName string[optional]
return array

friendshipsIncoming() public method

Returns a collection of numeric IDs for every user who has a pending request to follow the authenticating user.
public friendshipsIncoming ( string[optional] $cursor = null, bool[optional] $stringifyIds = true ) : array
$cursor string[optional]
$stringifyIds bool[optional]
return array

friendshipsLookup() public method

Values for connections can be: following, following_requested, followed_by, none.
public friendshipsLookup ( mixed[optional] $userIds = null, mixed[optional] $screenNames = null ) : array
$userIds mixed[optional]
$screenNames mixed[optional]
return array

friendshipsOutgoing() public method

Returns a collection of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
public friendshipsOutgoing ( string[optional] $cursor = null, bool[optional] $stringifyIds = true ) : array
$cursor string[optional]
$stringifyIds bool[optional]
return array

friendshipsShow() public method

Returns detailed information about the relationship between two arbitrary users.
public friendshipsShow ( string[optional] $sourceId = null, string[optional] $sourceScreenName = null, string[optional] $targetId = null, string[optional] $targetScreenName = null ) : array
$sourceId string[optional]
$sourceScreenName string[optional]
$targetId string[optional]
$targetScreenName string[optional]
return array

friendshipsUpdate() public method

Allows one to enable or disable retweets and device notifications from the specified user.
public friendshipsUpdate ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $device = null, bool[optional] $retweets = null ) : array
$userId string[optional]
$screenName string[optional]
$device bool[optional]
$retweets bool[optional]
return array

geoId() public method

Returns all the information about a known place.
public geoId ( string $id ) : array
$id string A place in the world. These IDs can be retrieved from geo/reverse_geocode.
return array

geoPlace() public method

Creates a new place at the given latitude and longitude.
public geoPlace ( string $name, string $containedWithin, string $token, float $lat, float $long, array $attributes = null ) : array
$name string The name a place is known as.
$containedWithin string The place_id within which the new place can be found. Try and be as close as possible with the containing place. For example, for a room in a building, set the contained_within as the building place_id.
$token string The token found in the response from geo/similar_places.
$lat float The latitude the place is located at. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn't a corresponding long parameter.
$long float The longitude the place is located at. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter.
$attributes array
return array

geoReverseGeoCode() public method

This request is an informative call and will deliver generalized results about geography.
public geoReverseGeoCode ( float $lat, float $long, string[optional] $accuracy = null, string[optional] $granularity = null, int[optional] $maxResults = null ) : array
$lat float The latitude to search around. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn't a corresponding long parameter.
$long float The longitude to search around. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter.
$accuracy string[optional]
$granularity string[optional]
$maxResults int[optional]
return array

geoSearch() public method

Conceptually, a query can be made from the user's location, retrieve a list of places, have the user validate the location he or she is at, and then send the ID of this location with a call to POST statuses/update. This is the recommended method to use find places that can be attached to statuses/update. Unlike GET geo/reverse_geocode which provides raw data access, this endpoint can potentially re-order places with regards to the user who is authenticated. This approach is also preferred for interactive place matching with the user.
public geoSearch ( float[optional] $lat = null, float[optional] $long = null, string[optional] $query = null, string[optional] $ip = null, string[optional] $granularity = null, string[optional] $accuracy = null, int[optional] $maxResults = null, string[optional] $containedWithin = null, array $attributes = null ) : array
$lat float[optional]
$long float[optional]
$query string[optional]
$ip string[optional]
$granularity string[optional]
$accuracy string[optional]
$maxResults int[optional]
$containedWithin string[optional]
$attributes array
return array

geoSimilarPlaces() public method

Conceptually you would use this method to get a list of known places to choose from first. Then, if the desired place doesn't exist, make a request to POST geo/place to create a new one. The token contained in the response is the token needed to be able to create a new place.
public geoSimilarPlaces ( float $lat, float $long, string $name, string[optional] $containedWithin = null, array $attributes = null ) : array
$lat float The latitude to search around. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn't a corresponding long parameter.
$long float The longitude to search around. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter.
$name string The name a place is known as.
$containedWithin string[optional]
$attributes array
return array

getConsumerKey() protected method

Get the consumer key
protected getConsumerKey ( ) : string
return string

getConsumerSecret() protected method

Get the consumer secret
protected getConsumerSecret ( ) : string
return string

getOAuthToken() protected method

Get the oAuth-token
protected getOAuthToken ( ) : string
return string

getOAuthTokenSecret() protected method

Get the oAuth-token-secret
protected getOAuthTokenSecret ( ) : string
return string

getTimeOut() public method

Get the timeout
public getTimeOut ( ) : integer
return integer

getUserAgent() public method

It will look like: "PHP Twitter/ "
public getUserAgent ( ) : string
return string

helpConfiguration() public method

It is recommended applications request this endpoint when they are loaded, but no more than once a day.
public helpConfiguration ( ) : array
return array

helpLanguages() public method

Returns the list of languages supported by Twitter along with their ISO 639-1 code. The ISO 639-1 code is the two letter value to use if you include lang with any of your requests.
public helpLanguages ( ) : array
return array

helpPrivacy() public method

Returns Twitter's Privacy Policy
public helpPrivacy ( ) : array
return array

helpTos() public method

Returns the Twitter Terms of Service in the requested format. These are not the same as the Developer Rules of the Road.
public helpTos ( ) : array
return array

hmacsha1() protected method

Build the signature for the data
protected hmacsha1 ( string $key, string $data ) : string
$key string The key to use for signing.
$data string The data that has to be signed.
return string

listSubscriptions() public method

Not implemented yet
public listSubscriptions ( )

listsCreate() public method

Not implemented yet
public listsCreate ( )

listsDestroy() public method

Not implemented yet
public listsDestroy ( )

listsList() public method

Not implemented yet
public listsList ( )

listsMembers() public method

Not implemented yet
public listsMembers ( )

listsMembersCreate() public method

Not implemented yet
public listsMembersCreate ( )

listsMembersCreateAll() public method

Not implemented yet

listsMembersDestroy() public method

Not implemented yet
public listsMembersDestroy ( )

listsMembersDestroyAll() public method

Not implemented yet

listsMembersShow() public method

Not implemented yet
public listsMembersShow ( )

listsMemberships() public method

Not implemented yet
public listsMemberships ( )

listsShow() public method

Not implemented yet
public listsShow ( )

listsStatuses() public method

Not implemented yet
public listsStatuses ( )

listsSubscribers() public method

Not implemented yet
public listsSubscribers ( )

listsSubscribersCreate() public method

Not implemented yet

listsSubscribersDestroy() public method

Not implemented yet

listsSubscribersShow() public method

Not implemented yet

listsUpdate() public method

Not implemented yet
public listsUpdate ( )

oAuthAccessToken() public method

This method fulfills Secion 6.3 of the OAuth 1.0 authentication flow.
public oAuthAccessToken ( string $token, string $verifier ) : array
$token string The token to use.
$verifier string The verifier.
return array

oAuthAuthenticate() public method

This method is a replacement fulfills Secion 6.2 of the OAuth 1.0 authentication flow for applications using the Sign in with Twitter authentication flow. The method will use the currently logged in user as the account to for access authorization unless the force_login parameter is set to true
public oAuthAuthenticate ( string $token, bool[optional] $force = false, string[optional] $screen_name = false )
$token string The token.
$force bool[optional]
$screen_name string[optional]

oAuthAuthorize() public method

Will redirect to the page to authorize the applicatione
public oAuthAuthorize ( string $token )
$token string The token.

oAuthRequestToken() public method

This method fulfills Secion 6.1 of the OAuth 1.0 authentication flow.
public oAuthRequestToken ( string[optional] $callbackURL = null ) : array
$callbackURL string[optional]
return array An array containg the token and the secret

reportSpam() public method

The user specified in the id is blocked by the authenticated user and reported as a spammer.
public reportSpam ( string[optional] $screenName = null, string[optional] $userId = null ) : array
$screenName string[optional]
$userId string[optional]
return array

savedSearchesCreate() public method

Create a new saved search for the authenticated user. A user may only have 25 saved searches.
public savedSearchesCreate ( string $query ) : array
$query string The query of the search the user would like to save.
return array

savedSearchesDestroy() public method

Destroys a saved search for the authenticating user. The authenticating user must be the owner of saved search id being destroyed.
public savedSearchesDestroy ( string $id ) : array
$id string The ID of the saved search.
return array

savedSearchesList() public method

Returns the authenticated user's saved search queries.
public savedSearchesList ( ) : array
return array

savedSearchesShow() public method

Retrieve the information for the saved search represented by the given id. The authenticating user must be the owner of saved search ID being requested.
public savedSearchesShow ( string $id ) : array
$id string The ID of the saved search.
return array

searchTweets() public method

Returns tweets that match a specified query.
public searchTweets ( string $q, string[optional] $geocode = null, string[optional] $lang = null, string[optional] $locale = null, string[optional] $resultType = null, int[optional] $count = null, string[optional] $until = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $includeEntities = null ) : array
$q string A UTF-8, URL-encoded search query of 1,000 characters maximum, including operators. Queries may additionally be limited by complexity.
$geocode string[optional]
$lang string[optional]
$locale string[optional]
$resultType string[optional]
$count int[optional]
$until string[optional]
$sinceId string[optional]
$maxId string[optional]
$includeEntities bool[optional]
return array

setConsumerKey() protected method

Set the consumer key
protected setConsumerKey ( string $key )
$key string The consumer key to use.

setConsumerSecret() protected method

Set the consumer secret
protected setConsumerSecret ( string $secret )
$secret string The consumer secret to use.

setOAuthToken() public method

Set the oAuth-token
public setOAuthToken ( string $token )
$token string The token to use.

setOAuthTokenSecret() public method

Set the oAuth-secret
public setOAuthTokenSecret ( string $secret )
$secret string The secret to use.

setReturnAsArray() protected method

Set the response type
protected setReturnAsArray ( boolean $value )
$value boolean True for array and false for object

setTimeOut() public method

Set the timeout
public setTimeOut ( integer $seconds )
$seconds integer The timeout in seconds.

setUserAgent() public method

It will look like: "PHP Twitter/ "
public setUserAgent ( string $userAgent )
$userAgent string Your user-agent, it should look like /.

site() public method

Not implemented yet
public site ( )

statusesDestroy() public method

Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status. Returns the destroyed status if successful.
public statusesDestroy ( string $id, bool[optional] $trimUser = null ) : array
$id string The numerical ID of the desired status.
$trimUser bool[optional]
return array

statusesFilter() public method

Not implemented yet
public statusesFilter ( )

statusesFirehose() public method

Not implemented yet
public statusesFirehose ( )

statusesHomeTimeline() public method

This method is identical to statusesFriendsTimeline, except that this method always includes retweets.
public statusesHomeTimeline ( int[optional] $count = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $excludeReplies = null, bool[optional] $contributorDetails = null, bool[optional] $includeEntities = null ) : array
$count int[optional]
$sinceId string[optional]
$maxId string[optional]
$trimUser bool[optional]
$excludeReplies bool[optional]
$contributorDetails bool[optional]
$includeEntities bool[optional]
return array

statusesMentionsTimeline() public method

The timeline returned is the equivalent of the one seen when you view your mentions on twitter.com. This method can only return up to 800 tweets.
public statusesMentionsTimeline ( int[optional] $count = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $contributorDetails = null, bool[optional] $includeEntities = null ) : array
$count int[optional]
$sinceId string[optional]
$maxId string[optional]
$trimUser bool[optional]
$contributorDetails bool[optional]
$includeEntities bool[optional]
return array

statusesOEmbed() public method

public statusesOEmbed ( string[optional] $id = null, string[optional] $url = null, int[optional] $maxwidth = null, bool[optional] $hideMedia = null, bool[optional] $hideThread = null, bool[optional] $omitScript = null, string[optional] $align = null, string[optional] $related = null, string[optional] $lang = null ) : array
$id string[optional]
$url string[optional]
$maxwidth int[optional]
$hideMedia bool[optional]
$hideThread bool[optional]
$omitScript bool[optional]
$align string[optional]
$related string[optional]
$lang string[optional]
return array

statusesRetweet() public method

Retweets a tweet. Returns the original tweet with retweet details embedded.
public statusesRetweet ( string $id, bool[optional] $trimUser = null ) : array
$id string The numerical ID of the desired status.
$trimUser bool[optional]
return array

statusesRetweets() public method

Returns up to 100 of the first retweets of a given tweet.
public statusesRetweets ( string $id, int[optional] $count = null, bool[optional] $trimUser = null ) : array
$id string The numerical ID of the desired status.
$count int[optional]
$trimUser bool[optional]
return array

statusesRetweetsOfMe() public method

Returns the most recent tweets authored by the authenticating user that have recently been retweeted by others. This timeline is a subset of the user's GET statuses/user_timeline.
public statusesRetweetsOfMe ( int[optional] $count = null, string[optional] $sinceId = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $includeEntities = null, bool[optional] $includeUserEntities = null ) : array
$count int[optional]
$sinceId string[optional]
$maxId string[optional]
$trimUser bool[optional]
$includeEntities bool[optional]
$includeUserEntities bool[optional]
return array

statusesSample() public method

Not implemented yet
public statusesSample ( )

statusesShow() public method

Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the tweet.
public statusesShow ( string $id, bool[optional] $trimUser = null, bool[optional] $includeMyRetweet = null, bool[optional] $includeEntities = null ) : array
$id string The numerical ID of the desired Tweet.
$trimUser bool[optional]
$includeMyRetweet bool[optional]
$includeEntities bool[optional]
return array

statusesUpdate() public method

Updates the authenticating user's status. A status update with text identical to the authenticating user's text identical to the authenticating user's current status will be ignored to prevent duplicates.
public statusesUpdate ( string $status, string[optional] $inReplyToStatusId = null, float[optional] $lat = null, float[optional] $long = null, string[optional] $placeId = null, bool[optional] $displayCoordinates = null, bool[optional] $trimUser = null ) : array
$status string The text of your status update, typically up to 140 characters. URL encode as necessary. t.co link wrapping may effect character counts. There are some special commands in this field to be aware of. For instance, preceding a message with "D " or "M " and following it with a screen name can create a direct message to that user if the relationship allows for it.
$inReplyToStatusId string[optional]
$lat float[optional]
$long float[optional]
$placeId string[optional]
$displayCoordinates bool[optional]
$trimUser bool[optional]
return array

statusesUpdateWithMedia() public method

Not implemented yet

statusesUserTimeline() public method

User timelines belonging to protected users may only be requested when the authenticated user either "owns" the timeline or is an approved follower of the owner. The timeline returned is the equivalent of the one seen when you view a user's profile on twitter.com. This method can only return up to 3,200 of a user's most recent Tweets. Native retweets of other statuses by the user is included in this total, regardless of whether include_rts is set to false when requesting this resource.
public statusesUserTimeline ( string[optional] $userId = null, string[optional] $screenName = null, string[optional] $sinceId = null, int[optional] $count = null, string[optional] $maxId = null, bool[optional] $trimUser = null, bool[optional] $excludeReplies = null, bool[optional] $contributorDetails = null, bool[optional] $includeRts = null ) : array
$userId string[optional]
$screenName string[optional]
$sinceId string[optional]
$count int[optional]
$maxId string[optional]
$trimUser bool[optional]
$excludeReplies bool[optional]
$contributorDetails bool[optional]
$includeRts bool[optional]
return array

trendsAvailable() public method

The response is an array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID) and some other human-readable information such as a canonical name and country the location belongs in. The WOEID that is returned in the location object is to be used when querying for a specific trend.
public trendsAvailable ( float[optional] $lat = null, float[optional] $long = null ) : array
$lat float[optional]
$long float[optional]
return array

trendsClosest() public method

The response is an array of "locations" that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in.
public trendsClosest ( float[optional] $lat = null, float[optional] $long = null ) : array
$lat float[optional]
$long float[optional]
return array

trendsPlace() public method

The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL. This information is cached for 5 minutes. Requesting more frequently than that will not return any more data, and will count against your rate limit usage.
public trendsPlace ( string $id, string[optional] $exclude = null ) : array
$id string The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.
$exclude string[optional]
return array

urlencode_rfc3986() protected static method

URL-encode method for internal use
protected static urlencode_rfc3986 ( mixed $value ) : string
$value mixed The value to encode.
return string

user() public method

Not implemented yet
public user ( )

usersContributees() public method

Returns a collection of users that the specified user can "contribute" to.
public usersContributees ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$userId string[optional]
$screenName string[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

usersContributors() public method

Returns a collection of users who can contribute to the specified account.
public usersContributors ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$userId string[optional]
$screenName string[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array

usersLookup() public method

Returns fully-hydrated user objects for up to 100 users per request, as specified by comma-separated values passed to the user_id and/or screen_name parameters.
public usersLookup ( mixed[optional] $userIds = null, mixed[optional] $screenNames = null, bool[optional] $includeEntities = null ) : array
$userIds mixed[optional]
$screenNames mixed[optional]
$includeEntities bool[optional]
return array

usersProfileBanner() public method

Returns a map of the available size variations of the specified user's profile banner. If the user has not uploaded a profile banner, a HTTP 404 will be served instead.
public usersProfileBanner ( string[optional] $userId = null, string[optional] $screenName = null ) : array
$userId string[optional]
$screenName string[optional]
return array

usersSearch() public method

Usage note: It is only possible to retrieve the first 1000 matches from this API.
public usersSearch ( string $q, int[optional] $page = null, int[optional] $count = null, bool[optional] $includeEntities = null ) : array
$q string The search query to run against people search.
$page int[optional]
$count int[optional]
$includeEntities bool[optional]
return array

usersShow() public method

The author's most recent Tweet will be returned inline when possible.
public usersShow ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null ) : array
$userId string[optional]
$screenName string[optional]
$includeEntities bool[optional]
return array

usersSuggestions() public method

Access to Twitter's suggested user list. This returns the list of suggested user categories. The category can be used in usersSuggestionsSlug to get the users in that category.
public usersSuggestions ( string[optional] $lang = null ) : array
$lang string[optional]
return array

usersSuggestionsSlug() public method

It is recommended that applications cache this data for no more than one hour.
public usersSuggestionsSlug ( string $slug, string[optional] $lang = null ) : array
$slug string The short name of list or a category.
$lang string[optional]
return array

usersSuggestionsSlugMembers() public method

Access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user.
public usersSuggestionsSlugMembers ( string $slug ) : array
$slug string The short name of list or a category
return array

Property Details

$consumerKey protected_oe property

The consumer key
protected string $consumerKey
return string

$consumerSecret protected_oe property

The consumer secret
protected string $consumerSecret
return string

$curl protected_oe property

A cURL instance
protected resource $curl
return resource

$oAuthToken protected_oe property

The oAuth-token
protected string $oAuthToken
return string

$oAuthTokenSecret protected_oe property

The oAuth-token-secret
protected string $oAuthTokenSecret
return string

$returnAsArray protected_oe property

The response should be cast as array or not
protected bool $returnAsArray
return boolean

$timeOut protected_oe property

The timeout
protected int $timeOut
return integer

$userAgent protected_oe property

The user agent
protected string $userAgent
return string