Functions
Function | Description |
---|---|
callUncached |
Piggybacks on the base call to provide error checking for Instagram. |
comment |
Leaves a comment on a media post by the authenticated user. |
deleteComment |
Leaves a comment on a media post by the authenticated user. |
getComments |
Returns a list of comments for a given media ID. |
getFeed |
Returns the authenticated user's feed. |
getFriends |
Returns a list of people the given user ID follows |
getFollowers |
Returns a list of people the given user ID is followed by |
getFollowRequests |
Returns a list of people that are awaiting permission to follow the authenticated user |
getLikedMedia |
Returns a list of media the authenticated user has liked |
getLikes |
Returns a list of users that like a given media ID. |
getLocation |
Returns location information for a given ID. |
getLocationByFoursquareID |
Returns location information for a given Foursquare API v2 ID. |
getLocationByLegacyFoursquareID |
Returns location information for a given Foursquare API v1 ID. |
getLocationMedia |
Returns recent media from a given location |
getMedia |
Gets information about a given media ID |
getRelationship |
Returns the relationship of the given user to the authenticated user |
getTaggedMedia |
Returns recent photos that contain a given tag. |
getUser |
Returns information about a given user ID. |
getUserMedia |
Returns recent media from a given user ID. |
like |
Sets a like on the given media by the authenticated user. |
popularMedia |
Returns a list of popular media. |
searchLocations |
Returns locations that match the search location or Foursquare ID |
searchMedia |
Search for media taken in a given area. |
searchTags |
Returns tags that match the search query. |
searchUsers |
Returns users that match the search query. |
setRelationship |
Modifies the authenticated user's relationship with the given user. |
unlike |
Removes a like on the given media set by the authenticated user. |
callUncached
Piggybacks on the base call to provide error checking for Instagram.
callUncached()
comment
Leaves a comment on a media post by the authenticated user.
This method requires special access permissions for your Instagram application.
Please email apidevelopers@instagram.com for access.
Return Value: true if successful
comment($id, $comment)
Parameter | Description |
---|---|
$id |
The media ID to comment on. |
$comment |
The text to leave as a comment. |
deleteComment
Leaves a comment on a media post by the authenticated user.
Return Value: true if successful
deleteComment($id, $comment)
Parameter | Description |
---|---|
$id |
The media ID the comment was left on. |
$comment |
The comment ID. |
getComments
Returns a list of comments for a given media ID.
Return Value: An array of BigTreeInstagramComment objects.
getComments($id)
Parameter | Description |
---|---|
$id |
The media ID to retrieve comments for. |
getFeed
Returns the authenticated user's feed.
Return Value: A BigTreeInstagramResultSet of BigTreeInstagramMedia objects.
getFeed($count, $params)
Parameter | Description |
---|---|
$count |
The number of media results to return (defaults to 10) |
$params |
Additional parameters to pass to the users/self/feed API call |
getFriends
Returns a list of people the given user ID follows
Return Value: An array of BigTreeInstagramUser objects
getFriends($id)
Parameter | Description |
---|---|
$id |
The user ID to retrieve the friends of |
getFollowers
Returns a list of people the given user ID is followed by
Return Value: An array of BigTreeInstagramUser objects
getFollowers($id)
Parameter | Description |
---|---|
$id |
The user ID to retrieve the followers of |
getFollowRequests
Returns a list of people that are awaiting permission to follow the authenticated user
Return Value: An array of BigTreeInstagramUser objects
getFollowRequests()
getLikedMedia
Returns a list of media the authenticated user has liked
Return Value: A BigTreeInstagramResultSet of BigTreeInstagramMedia objects.
getLikedMedia($count, $params)
Parameter | Description |
---|---|
$count |
The number of media results to return (defaults to 10) |
$params |
Additional parameters to pass to the users/self/media/liked API call |
getLikes
Returns a list of users that like a given media ID.
Return Value: An array of BigTreeInstagramUser objects.
getLikes($id)
Parameter | Description |
---|---|
$id |
The media ID to get likes for |
getLocation
Returns location information for a given ID.
Return Value: A BigTreeInstagramLocation object.
getLocation($id)
Parameter | Description |
---|---|
$id |
The location ID |
getLocationByFoursquareID
Returns location information for a given Foursquare API v2 ID.
Return Value: A BigTreeInstagramLocation object.
getLocationByFoursquareID($id)
Parameter | Description |
---|---|
$id |
The Foursquare API ID. |
getLocationByLegacyFoursquareID
Returns location information for a given Foursquare API v1 ID.
Return Value: A BigTreeInstagramLocation object.
getLocationByLegacyFoursquareID($id)
Parameter | Description |
---|---|
$id |
The Foursquare API ID. |
getLocationMedia
Returns recent media from a given location
Return Value: A BigTreeInstagramResultSet of BigTreeInstagramMedia objects.
getLocationMedia($id, $params)
Parameter | Description |
---|---|
$id |
The location ID to pull media for |
$params |
Additional parameters to pass to the locations/{id}/media/recent API call |
getMedia
Gets information about a given media ID
Return Value: A BigTreeInstagramMedia object.
getMedia($id, $shortcode = false)
Parameter | Description |
---|---|
$id |
The media ID |
$shortcode |
The media shortcode (from instagram.com shortlink URL, optional & replaces ID) |
getRelationship
Returns the relationship of the given user to the authenticated user
Return Value: An object containg an "Incoming" key (whether they follow you, have requested to follow you, or nothing) and "Outgoing" key (whether you follow them, block them, etc)
getRelationship($id)
Parameter | Description |
---|---|
$id |
The user ID to check the relationship of |
getTaggedMedia
Returns recent photos that contain a given tag.
Return Value: A BigTreeInstagramResultSet of BigTreeInstagramMedia objects.
getTaggedMedia($tag, $params)
Parameter | Description |
---|---|
$tag |
The tag to search for |
$params |
Additional parameters to pass to the tags/{tag}/media/recent API call |
getUser
Returns information about a given user ID.
Return Value: A BigTreeInstagramUser object.
getUser($id)
Parameter | Description |
---|---|
$id |
The user ID to look up |
getUserMedia
Returns recent media from a given user ID.
Return Value: A BigTreeInstagramResultSet of BigTreeInstagramMedia objects.
getUserMedia($id, $count, $params)
Parameter | Description |
---|---|
$id |
The user ID to return media for. |
$count |
The number of media results to return (defaults to 10). |
$params |
Additional parameters to pass to the users/{id}/media/recent API call. |
like
Sets a like on the given media by the authenticated user.
Return Value: true if successful
like($id)
Parameter | Description |
---|---|
$id |
The media ID to like |
popularMedia
Returns a list of popular media.
Return Value: An array of BigTreeInstagramMedia objects.
popularMedia()
searchLocations
Returns locations that match the search location or Foursquare ID
Return Value: An array of BigTreeInstagramLocation objects
searchLocations($latitude = false, $longitude = false, $distance = 1000, $foursquare_id = false, $legacy_foursquare_id = false)
Parameter | Description |
---|---|
$latitude |
Latitude (required if not searching by Foursquare ID) |
$longitude |
Longitude (required if not searching by Foursquare ID) |
$distance |
Numeric value in meters to search from the lat/lon location (defaults to 1000) |
$foursquare_id |
Foursquare API v2 ID to search by (ignores lat/lon) |
$legacy_foursquare_id |
Legacy Foursquare API v1 ID to search by (ignores lat/lon and API v2 ID) |
searchMedia
Search for media taken in a given area.
Return Value: A BigTreeInstagramResultSet of BigTreeInstagramMedia objects.
searchMedia($latitude, $longitude, $distance, $params)
Parameter | Description |
---|---|
$latitude |
Latitude |
$longitude |
Longitude |
$distance |
Distance (in meters) to search (default is 1000, max is 5000) |
$params |
Additional parameters to pass to the media/search API call |
searchTags
Returns tags that match the search query.
Exact match is the first result followed by most popular.
If the exact match is popular enough, it is the only result.
Return Value: An array of BigTreeInstagramTag objects.
searchTags($tag)
Parameter | Description |
---|---|
$tag |
Tag to search for |
searchUsers
Returns users that match the search query.
Return Value: An array of BigTreeInstagramUser objects.
searchUsers($query, $count = 10)
Parameter | Description |
---|---|
$query |
String to search for. |
$count |
Number of results to return (defaults to 10) |
setRelationship
Modifies the authenticated user's relationship with the given user.
Return Value: true if successful.
setRelationship($id, $action)
Parameter | Description |
---|---|
$id |
The user ID to set relationship status with |
$action |
"follow", "unfollow", "block", "unblock", "approve", or "deny" |
unlike
Removes a like on the given media set by the authenticated user.
Return Value: true if successful
unlike($id)
Parameter | Description |
---|---|
$id |
The media ID to like |