Twitter class
subpackage |
Models |
---|---|
package |
Modules |
__construct(string $consumerKey = '', string $consumerSecret = '')
string
The consumer key to use.
string
The consumer secret to use.
__destruct()
accountRemoveProfileBanner() : boolean
boolean
accountSettings() : array
array
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
\string[optional]
The Yahoo! Where On Earth ID to use as the user's default trend location. Global information is available by using 1 as the WOEID. The woeid must be one of the locations returned by trendsAvailable.
\bool[optional]
When set to true, will enable sleep time for the user. Sleep time is the time when push or SMS notifications should not be sent to the user.
\string[optional]
The hour that sleep time should begin if it is enabled. The value for this parameter should be provided in ISO8601 format (i.e. 00-23). The time is considered to be in the same timezone as the user's time_zone setting.
\string[optional]
The hour that sleep time should end if it is enabled. The value for this parameter should be provided in ISO8601 format (i.e. 00-23). The time is considered to be in the same timezone as the user's time_zone setting.
\string[optional]
The timezone dates and times should be displayed in for the user. The timezone must be one of the Rails TimeZone names.
\string[optional]
The language which Twitter should render in for this user. The language must be specified by the appropriate two letter ISO 639-1 representation. Currently supported languages are provided by helpLanguages.
array
accountUpdateDeliveryDevice(string $device, \bool[optional] $includeEntities = null) : array
string
Must be one of: sms, none.
\bool[optional]
When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. While entities are opt-in on timelines at present, they will be made a default component of output in the future. See Tweet Entities for more detail on entities.
array
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
\string[optional]
Full name associated with the profile. Maximum of 20 characters.
\string[optional]
URL associated with the profile. Will be prepended with "http://" if not present. Maximum of 100 characters.
\string[optional]
The city or country describing where the user of the account is located. The contents are not normalized or geocoded in any way. Maximum of 30 characters.
\string[optional]
A description of the user owning the account. Maximum of 160 characters.
\bool[optional]
The entities node will not be included when set to false.
\bool[optional]
When set to true, statuses will not be included in the returned user objects.
array
accountUpdateProfileBackgroundImage(string $image, \bool[optional] $tile = false, \bool[optional] $includeEntities = null) : array
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.
\bool[optional]
Whether or not to tile the background image. If set to true the background image will be displayed tiled. The image will not be tiled otherwise.
\bool[optional]
When set to true each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
array
accountUpdateProfileBanner()
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
Each parameter's value must be a valid hexidecimal value, and may be either three or six characters (ex: #fff or #ffffff).
\string[optional]
Profile background color.
\string[optional]
Profile text color.
\string[optional]
Profile link color.
\string[optional]
Profile sidebar's background color.
\string[optional]
Profile sidebar's border color.
\bool[optional]
When set to true each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
array
accountUpdateProfileImage(string $image, \bool[optional] $includeEntities = null) : array
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.
\bool[optional]
When set to true each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
array
accountVerifyCredentials(\bool[optional] $includeEntities = null, \bool[optional] $skipStatus = null) : array
\bool[optional]
The entities node will not be included when set to false.
\bool[optional]
When set to true, statuses will not be included in the returned user objects.
array
applicationRateLimitStatus(array $resources = null) : string
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.
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.
string
blocksCreate(\string[optional] $userId = null, \string[optional] $screenName = null, \bool[optional] $includeEntities = null, \bool[optional] $skipStatus = null) : array
\string[optional]
The ID of the potentially blocked user. Helpful for disambiguating when a valid user ID is also a valid screen name.
\string[optional]
The screen name of the potentially blocked user. Helpful for disambiguating when a valid screen name is also a user ID.
\bool[optional]
The entities node will not be included when set to false.
\bool[optional]
When set to either true, t or 1 statuses will not be included in the returned user objects.
array
blocksDestroy(\string[optional] $userId = null, \string[optional] $screenName = null, \bool[optional] $includeEntities = null, \bool[optional] $skipStatus = null) : array
\string[optional]
The ID of the potentially blocked user. Helpful for disambiguating when a valid user ID is also a valid screen name.
\string[optional]
The screen name of the potentially blocked user. Helpful for disambiguating when a valid screen name is also a user ID.
\bool[optional]
The entities node will not be included when set to false.
\bool[optional]
When set to either true, t or 1 statuses will not be included in the returned user objects.
array
blocksIds(\string[optional] $cursor = null, \bool[optional] $stringifyIds = null) : array
\string[optional]
Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."
\bool[optional]
Many programming environments will not consume our ids due to their size. Provide this option to have ids returned as strings instead.
array
blocksList(\int[optional] $cursor = null, \bool[optional] $includeEntities = null, \bool[optional] $skipStatus = null) : array
\int[optional]
Causes the results to be broken into pages of no more than 20 records at a time. If no cursor is provided, a value of -1 will be assumed, which is the first "page."
\bool[optional]
The user object entities node will be disincluded when set to false.
\bool[optional]
When set to either true, t or 1 statuses will not be included in the returned user objects.
array
buildQuery(array $parameters) : string
array
The parameters.
string
calculateBaseString(string $url, string $method, array $parameters) : string
string
The URL.
string
The method to use.
array
The parameters.
string
calculateHeader(array $parameters, string $url) : string
later |
: fix me |
---|
array
The parameters.
string
The URL.
string
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
Important: This method requires an access token with RWD (read, write & direct message) permissions. Consult The Application Permission Model for more information.
\string[optional]
Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.
\string[optional]
Returns results with an ID less than (that is, older than) or equal to the specified ID.
\int[optional]
Specifies the number of direct messages to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of Tweets to return because suspended or deleted content is removed after the count has been applied.
\int[optional]
Specifies the page of results to retrieve.
\bool[optional]
The entities node will not be included when set to false.
\bool[optional]
When set to either true, t or 1 statuses will not be included in the returned user objects.
array
directMessagesDestroy(string $id, \bool[optional] $includeEntities = null) : array
Important: This method requires an access token with RWD (read, write & direct message) permissions. Consult The Application Permission Model for more information.
string
The ID of the direct message to delete.
\bool[optional]
The entities node will not be included when set to false.
array
directMessagesNew(\string[optional] $userId = null, \string[optional] $screenName = null, string $text) : array
\string[optional]
The ID of the user who should receive the direct message. Helpful for disambiguating when a valid user ID is also a valid screen name.
\string[optional]
The screen name of the user who should receive the direct message. Helpful for disambiguating when a valid screen name is also a user ID.
string
The text of your direct message. Be sure to URL encode as necessary, and keep the message under 140 characters.
array
directMessagesSent(\string[optional] $sinceId = null, \string[optional] $maxId = null, \int[optional] $count = null, \int[optional] $page = null, \bool[optional] $includeEntities = null) : array
Important: This method requires an access token with RWD (read, write & direct message) permissions. Consult The Application Permission Model for more information.
\string[optional]
Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.
\string[optional]
Returns results with an ID less than (that is, older than) or equal to the specified ID.
\int[optional]
Specifies the number of records to retrieve. Must be less than or equal to 200.
\int[optional]
Specifies the page of results to retrieve.
\bool[optional]
The entities node will not be included when set to false.
array
directMessagesShow(string $id) : array
string
The ID of the direct message.
array
doCall(string $url, \array[optional] $parameters = null, \bool[optional] $authenticate = false, \bool[optional] $method = 'GET', \string[optional] $filePath = null, \bool[optional] $expectJSON = true, \bool[optional] $returnHeaders = false) : string
string
The url to call.
\array[optional]
Optional parameters.
\bool[optional]
Should we authenticate.
\bool[optional]
The method to use. Possible values are GET, POST.
\string[optional]
The path to the file to upload.
\bool[optional]
Do we expect JSON.
\bool[optional]
Should the headers be returned?
string
doOAuthCall(string $method, \array[optional] $parameters = null) : array
todo |
refactor me |
---|
string
The method.
\array[optional]
The parameters.
array
favoritesCreate(string $id, \bool[optional] $includeEntities = null) : array
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.
string
The numerical ID of the desired status.
\bool[optional]
The entities node will be omitted when set to false.
array
favoritesDestroy(string $id, \bool[optional] $includeEntities = null) : array
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.
string
The numerical ID of the desired status.
\bool[optional]
The entities node will be omitted when set to false.
array
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
\string[otpional]
The ID of the user for whom to return results for.
\string[otpional]
The screen name of the user for whom to return results for.
\int[optional]
Specifies the number of records to retrieve. Must be less than or equal to 200. Defaults to 20.
\string[otpional]
Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.
\string[otpional]
Returns results with an ID less than (that is, older than) or equal to the specified ID.
\bool[optional]
The entities node will be omitted when set to false.
array
followersIds(\string[optional] $userId = null, \string[optional] $screenName = null, \string[optional] $cursor = null, \bool[optional] $stringifyIds = true) : array
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.
\string[optional]
The ID of the user for whom to return results for.
\string[optional]
The screen name of the user for whom to return results for.
\string[optional]
Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page." The response from the API will include a previous_cursor and next_cursor to allow paging back and forth
\bool[optional]
Many programming environments will not consume our Tweet ids due to their size. Provide this option to have ids returned as strings instead.
array
followersList(\string[optional] $userId = null, \string[optional] $screenName = null, \int[optional] $cursor = null, \bool[optional] $includeEntities = null, \bool[optional] $skipStatus = null) : array
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.
\string[optional]
The ID of the user for whom to return results for.
\string[optional]
The screen name of the user for whom to return results for.
\int[optional]
Causes the results to be broken into pages of no more than 20 records at a time. If no cursor is provided, a value of -1 will be assumed, which is the first "page."
\bool[optional]
The user object entities node will be disincluded when set to false.
\bool[optional]
When set to either true, t or 1 statuses will not be included in the returned user objects.
array
friendshipsCreate(\string[optional] $userId = null, \string[optional] $screenName = null, \bool[optional] $follow = false) : array
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.
\string[optional]
The ID of the user for whom to befriend.
\string[optional]
The screen name of the user for whom to befriend.
\bool[optional]
Enable notifications for the target user.
array
friendshipsDestroy(\string[optional] $userId = null, \string[optional] $screenName = null) : array
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.
\string[optional]
The ID of the user for whom to unfollow.
\string[optional]
The screen name of the user for whom to unfollow.
array
friendshipsIncoming(\string[optional] $cursor = null, \bool[optional] $stringifyIds = true) : array
\string[optional]
Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."
\bool[optional]
Many programming environments will not consume our Tweet ids due to their size. Provide this option to have ids returned as strings instead.
array
friendshipsLookup(\mixed[optional] $userIds = null, \mixed[optional] $screenNames = null) : array
Values for connections can be: following, following_requested, followed_by, none.
\mixed[optional]
An array of user IDs, up to 100 are allowed in a single request.
\mixed[optional]
An array of screen names, up to 100 are allowed in a single request.
array
friendshipsOutgoing(\string[optional] $cursor = null, \bool[optional] $stringifyIds = true) : array
\string[optional]
Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."
\bool[optional]
Many programming environments will not consume our Tweet ids due to their size. Provide this option to have ids returned as strings instead.
array
friendshipsShow(\string[optional] $sourceId = null, \string[optional] $sourceScreenName = null, \string[optional] $targetId = null, \string[optional] $targetScreenName = null) : array
\string[optional]
The user_id of the subject user.
\string[optional]
The screen_name of the subject user.
\string[optional]
The screen_name of the subject user.
\string[optional]
The screen_name of the target user.
array
friendshipsUpdate(\string[optional] $userId = null, \string[optional] $screenName = null, \bool[optional] $device = null, \bool[optional] $retweets = null) : array
\string[optional]
The ID of the user for whom to befriend.
\string[optional]
The screen name of the user for whom to befriend.
\bool[optional]
Enable/disable device notifications from the target user.
\bool[optional]
Enable/disable retweets from the target user.
array
friendsIds(\string[optional] $userId = null, \string[optional] $screenName = null, \string[optional] $cursor = null, \bool[optional] $stringifyIds = null) : array
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.
\string[optional]
The ID of the user for whom to return results for.
\string[optional]
The screen name of the user for whom to return results for.
\string[optional]
Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page." The response from the API will include a previous_cursor and next_cursor to allow paging back and forth
\bool[optional]
Many programming environments will not consume our Tweet ids due to their size. Provide this option to have ids returned as strings instead.
array
friendsList(\string[optional] $userId = null, \string[optional] $screenName = null, \int[optional] $cursor = null, \bool[optional] $includeEntities = null, \bool[optional] $skipStatus = null) : array
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.
\string[optional]
The ID of the user for whom to return results for.
\string[optional]
The screen name of the user for whom to return results for.
\int[optional]
Causes the results to be broken into pages of no more than 20 records at a time. If no cursor is provided, a value of -1 will be assumed, which is the first "page."
\bool[optional]
The user object entities node will be disincluded when set to false.
\bool[optional]
When set to either true, t or 1 statuses will not be included in the returned user objects.
array
geoId(string $id) : array
string
A place in the world. These IDs can be retrieved from geo/reverse_geocode.
array
geoPlace(string $name, string $containedWithin, string $token, float $lat, float $long, \array[optional] $attributes = null) : array
string
The name a place is known as.
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.
string
The token found in the response from geo/similar_places.
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.
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.
\array[optional]
This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. This should be an key-value-pair-array.
array
geoReverseGeoCode(float $lat, float $long, \string[optional] $accuracy = null, \string[optional] $granularity = null, \int[optional] $maxResults = null) : array
This request is an informative call and will deliver generalized results about geography.
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.
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.
\string[optional]
A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m. If coming from a device, in practice, this value is whatever accuracy the device has measuring its location (whether it be coming from a GPS, WiFi triangulation, etc.).
\string[optional]
This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, admin or country. If no granularity is provided for the request neighborhood is assumed. Setting this to city, for example, will find places which have a type of city, admin or country.
\int[optional]
A hint as to the number of results to return. This does not guarantee that the number of results returned will equal max_results, but instead informs how many "nearby" results to return. Ideally, only pass in the number of places you intend to display to the user here.
array
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[optional] $attributes = null) : array
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.
\float[optional]
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.
\float[optional]
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.
\string[optional]
Free-form text to match against while executing a geo-based query, best suited for finding nearby locations by name. Remember to URL encode the query.
\string[optional]
An IP address. Used when attempting to fix geolocation based off of the user's IP address.
\string[optional]
This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, admin or country. If no granularity is provided for the request neighborhood is assumed. Setting this to city, for example, will find places which have a type of city, admin or country.
\string[optional]
A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m. If coming from a device, in practice, this value is whatever accuracy the device has measuring its location (whether it be coming from a GPS, WiFi triangulation, etc.).
\int[optional]
A hint as to the number of results to return. This does not guarantee that the number of results returned will equal max_results, but instead informs how many "nearby" results to return. Ideally, only pass in the number of places you intend to display to the user here.
\string[optional]
This is the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found. Specify a place_id. For example, to scope all results to places within "San Francisco, CA USA", you would specify a place_id of "5a110d312052166f"
\array[optional]
This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. This should be an key-value-pair-array.
array
geoSimilarPlaces(float $lat, float $long, string $name, \string[optional] $containedWithin = null, \array[optional] $attributes = null) : array
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.
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.
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.
string
The name a place is known as.
\string[optional]
This is the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found. Specify a place_id. For example, to scope all results to places within "San Francisco, CA USA", you would specify a place_id of "5a110d312052166f"
\array[optional]
This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted.
array
getConsumerKey() : string
string
getConsumerSecret() : string
string
getOAuthToken() : string
string
getOAuthTokenSecret() : string
string
getTimeOut() : integer
integer
getUserAgent() : string
It will look like: "PHP Twitter/
string
helpConfiguration() : array
It is recommended applications request this endpoint when they are loaded, but no more than once a day.
array
helpLanguages() : array
array
helpPrivacy() : array
array
helpTos() : array
array
hmacsha1(string $key, string $data) : string
string
The key to use for signing.
string
The data that has to be signed.
string
listsCreate()
listsDestroy()
listsList()
listsMembers()
listsMembersCreate()
listsMembersCreateAll()
listsMembersDestroy()
listsMembersDestroyAll()
listsMemberships()
listsMembersShow()
listsShow()
listsStatuses()
listsSubscribers()
listsSubscribersCreate()
listsSubscribersDestroy()
listsSubscribersShow()
listSubscriptions()
listsUpdate()
oAuthAccessToken(string $token, string $verifier) : array
This method fulfills Secion 6.3 of the OAuth 1.0 authentication flow.
string
The token to use.
string
The verifier.
array
oAuthAuthenticate(string $token, \bool[optional] $force = false, \string[optional] $screen_name = false)
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
string
The token.
\bool[optional]
Force the authentication.
\string[optional]
Prefill the username input box of the OAuth login.
oAuthAuthorize(string $token)
string
The token.
oAuthRequestToken(\string[optional] $callbackURL = null) : array
This method fulfills Secion 6.1 of the OAuth 1.0 authentication flow.
\string[optional]
The callback URL.
array
An array containg the token and the secret
reportSpam(\string[optional] $screenName = null, \string[optional] $userId = null) : array
\string[optional]
The ID or screen_name of the user you want to report as a spammer. Helpful for disambiguating when a valid screen name is also a user ID.
\string[optional]
The ID of the user you want to report as a spammer. Helpful for disambiguating when a valid user ID is also a valid screen name.
array
savedSearchesCreate(string $query) : array
string
The query of the search the user would like to save.
array
savedSearchesDestroy(string $id) : array
string
The ID of the saved search.
array
savedSearchesList() : array
array
savedSearchesShow(string $id) : array
string
The ID of the saved search.
array
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
string
A UTF-8, URL-encoded search query of 1,000 characters maximum, including operators. Queries may additionally be limited by complexity.
\string[optional]
Returns tweets by users located within a given radius of the given latitude/longitude. The location is preferentially taking from the Geotagging API, but will fall back to their Twitter profile. The parameter value is specified by "latitude,longitude,radius", where radius units must be specified as either "mi" (miles) or "km" (kilometers). Note that you cannot use the near operator via the API to geocode arbitrary locations; however you can use this geocode parameter to search near geocodes directly. A maximum of 1,000 distinct "sub-regions" will be considered when using the radius modifier.
\string[optional]
Restricts tweets to the given language, given by an ISO 639-1 code. Language detection is best-effort.
\string[optional]
Specify the language of the query you are sending (only ja is currently effective). This is intended for language-specific consumers and the default should work in the majority of cases.
\string[optional]
Specifies what type of search results you would prefer to receive. The current default is "mixed." Valid values include: mixed: Include both popular and real time results in the response, recent: return only the most recent results in the response, popular: return only the most popular results in the response.
\int[optional]
The number of tweets to return per page, up to a maximum of 100. Defaults to 15. This was formerly the "rpp" parameter in the old Search API.
\string[optional]
Returns tweets generated before the given date. Date should be formatted as YYYY-MM-DD. Keep in mind that the search index may not go back as far as the date you specify here.
\string[optional]
Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.
\string[optional]
Returns results with an ID less than (that is, older than) or equal to the specified ID.
\bool[optional]
The entities node will be disincluded when set to false.
array
setConsumerKey(string $key)
string
The consumer key to use.
setConsumerSecret(string $secret)
string
The consumer secret to use.
setOAuthToken(string $token)
string
The token to use.
setOAuthTokenSecret(string $secret)
string
The secret to use.
setReturnAsArray(boolean $value)
boolean
True for array and false for object
setTimeOut(integer $seconds)
integer
The timeout in seconds.
setUserAgent(string $userAgent)
It will look like: "PHP Twitter/
string
Your user-agent, it should look like
site()
statusesDestroy(string $id, \bool[optional] $trimUser = null) : array
string
The numerical ID of the desired status.
\bool[optional]
When set to true, each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.
array
statusesFilter()
statusesFirehose()
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
This method is identical to statusesFriendsTimeline, except that this method always includes retweets.
\int[optional]
Specifies the number of records to retrieve. Must be less than or equal to 200. Defaults to 20.
\string[optional]
Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.
\string[optional]
Returns results with an ID less than (that is, older than) or equal to the specified ID.
\bool[optional]
When set to true, each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.
\bool[optional]
This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets โ this is because the count parameter retrieves that many tweets before filtering out retweets and replies.
\bool[optional]
This parameter enhances the contributors element of the status response to include the screen_name of the contributor. By default only the user_id of the contributor is included.
\bool[optional]
The entities node will be disincluded when set to false.
array
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
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.
\int[optional]
Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. We include retweets in the count, even if include_rts is not supplied.
\string[optional]
Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.
\string[optional]
Returns results with an ID less than (that is, older than) or equal to the specified ID.
\bool[optional]
When set to true, each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.
\bool[optional]
This parameter enhances the contributors element of the status response to include the screen_name of the contributor. By default only the user_id of the contributor is included.
\bool[optional]
The entities node will be disincluded when set to false.
array
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
\string[optional]
The Tweet/status ID to return embed code for.
\string[optional]
The URL of the Tweet/status to be embedded.
\int[optional]
The maximum width in pixels that the embed should be rendered at. This value is constrained to be between 250 and 550 pixels. Note that Twitter does not support the oEmbed maxheight parameter. Tweets are fundamentally text, and are therefore of unpredictable height that cannot be scaled like an image or video. Relatedly, the oEmbed response will not provide a value for height. Implementations that need consistent heights for Tweets should refer to the hide_thread and hide_media parameters below.
\bool[optional]
Specifies whether the embedded Tweet should automatically expand images which were uploaded via POST statuses/update_with_media. When set to true images will not be expanded. Defaults to false.
\bool[optional]
Specifies whether the embedded Tweet should automatically show the original message in the case that the embedded Tweet is a reply. When set to true the original Tweet will not be shown. Defaults to false.
\bool[optional]
Specifies whether the embedded Tweet HTML should include a