PHP 클래스 Twitter, twitter-php

파일 보기 프로젝트 열기: dg/twitter-php 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cacheDir string
$cacheExpire integer
$httpOptions array

공개 메소드들

메소드 설명
__construct ( $consumerKey, $consumerSecret, $accessToken = NULL, $accessTokenSecret = NULL ) Creates object using consumer and access keys.
authenticate ( ) : boolean Tests if user credentials are valid.
cachedRequest ( $resource, array $data = NULL, $cacheExpire = NULL ) : stdClass | stdClass[] Cached HTTP request.
clickable ( stdClass $status ) : string Makes twitter links, @usernames and #hashtags clickable.
destroy ( $id ) : mixed Destroys status.
follow ( $username ) : stdClass Follows a user on Twitter.
load ( $flags = self::ME, $count = 20, array $data = NULL ) : stdClass[] Returns the most recent statuses.
loadUserFollowers ( $username, $count = 5000, $cursor, $cacheExpiry = null ) : stdClass Returns IDs of followers of a given user.
loadUserFollowersList ( $username, $count = 200, $cursor, $cacheExpiry = null ) : stdClass Returns list of followers of a given user.
loadUserInfo ( $username ) : stdClass Returns information of a given user.
loadUserInfoById ( $id ) : stdClass Returns information of a given user by id.
request ( $resource, $method, array $data = NULL, array $files = NULL ) : stdClass | stdClass[] Process HTTP request.
search ( $query, $full = FALSE ) : stdClass Returns tweets that match a specified query.
send ( $message, $media = NULL ) : stdClass Sends message to the Twitter.
sendDirectMessage ( $username, $message ) : stdClass Sends a direct message to the specified user.

메소드 상세

__construct() 공개 메소드

Creates object using consumer and access keys.
public __construct ( $consumerKey, $consumerSecret, $accessToken = NULL, $accessTokenSecret = NULL )

authenticate() 공개 메소드

Tests if user credentials are valid.
public authenticate ( ) : boolean
리턴 boolean

cachedRequest() 공개 메소드

Cached HTTP request.
public cachedRequest ( $resource, array $data = NULL, $cacheExpire = NULL ) : stdClass | stdClass[]
$data array
리턴 stdClass | stdClass[]

clickable() 공개 정적인 메소드

Makes twitter links, @usernames and #hashtags clickable.
public static clickable ( stdClass $status ) : string
$status stdClass
리턴 string

destroy() 공개 메소드

Destroys status.
public destroy ( $id ) : mixed
리턴 mixed

follow() 공개 메소드

Follows a user on Twitter.
public follow ( $username ) : stdClass
리턴 stdClass see https://dev.twitter.com/rest/reference/post/friendships/create

load() 공개 메소드

Returns the most recent statuses.
public load ( $flags = self::ME, $count = 20, array $data = NULL ) : stdClass[]
$data array
리턴 stdClass[]

loadUserFollowers() 공개 메소드

Returns IDs of followers of a given user.
public loadUserFollowers ( $username, $count = 5000, $cursor, $cacheExpiry = null ) : stdClass
리턴 stdClass see https://dev.twitter.com/rest/reference/get/followers/ids

loadUserFollowersList() 공개 메소드

Returns list of followers of a given user.
public loadUserFollowersList ( $username, $count = 200, $cursor, $cacheExpiry = null ) : stdClass
리턴 stdClass see https://dev.twitter.com/rest/reference/get/followers/list

loadUserInfo() 공개 메소드

Returns information of a given user.
public loadUserInfo ( $username ) : stdClass
리턴 stdClass see https://dev.twitter.com/rest/reference/get/users/show

loadUserInfoById() 공개 메소드

Returns information of a given user by id.
public loadUserInfoById ( $id ) : stdClass
리턴 stdClass see https://dev.twitter.com/rest/reference/get/users/show

request() 공개 메소드

Process HTTP request.
public request ( $resource, $method, array $data = NULL, array $files = NULL ) : stdClass | stdClass[]
$data array
$files array
리턴 stdClass | stdClass[]

send() 공개 메소드

Sends message to the Twitter.
public send ( $message, $media = NULL ) : stdClass
리턴 stdClass see https://dev.twitter.com/rest/reference/post/statuses/update

sendDirectMessage() 공개 메소드

Sends a direct message to the specified user.
public sendDirectMessage ( $username, $message ) : stdClass
리턴 stdClass see https://dev.twitter.com/rest/reference/post/direct_messages/new

프로퍼티 상세

$cacheDir 공개적으로 정적으로 프로퍼티

public static string $cacheDir
리턴 string

$cacheExpire 공개적으로 정적으로 프로퍼티

public static int $cacheExpire
리턴 integer

$httpOptions 공개적으로 프로퍼티

public array $httpOptions
리턴 array