本文整理汇总了PHP中TwitterOAuth::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP TwitterOAuth::delete方法的具体用法?PHP TwitterOAuth::delete怎么用?PHP TwitterOAuth::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TwitterOAuth
的用法示例。
在下文中一共展示了TwitterOAuth::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
twitteroauth_row('statuses/retweets_of_me', $connection->get('statuses/retweets_of_me'), $connection->http_code);
/**
* Status Methods.
*/
twitteroauth_header('Status Methods');
/* statuses/update */
date_default_timezone_set('GMT');
$parameters = array('status' => date(DATE_RFC822));
$status = $connection->post('statuses/update', $parameters);
twitteroauth_row('statuses/update', $status, $connection->http_code, $parameters);
/* statuses/show */
$method = "statuses/show/{$status->id}";
twitteroauth_row($method, $connection->get($method), $connection->http_code);
/* statuses/destroy */
$method = "statuses/destroy/{$status->id}";
twitteroauth_row($method, $connection->delete($method), $connection->http_code);
/* statuses/retweet */
$method = 'statuses/retweet/6242973112';
twitteroauth_row($method, $connection->post($method), $connection->http_code);
/* statuses/retweets */
$method = 'statuses/retweets/6242973112';
twitteroauth_row($method, $connection->get($method), $connection->http_code);
/**
* User Methods.
*/
twitteroauth_header('User Methods');
/* users/show */
$method = 'users/show/27831060';
twitteroauth_row($method, $connection->get($method), $connection->http_code);
/* users/search */
$parameters = array('q' => 'oauth');
示例2: array
twitteroauth_row('statuses/retweets_of_me', $twitter->get('statuses/retweets_of_me'), $twitter->http_code);
/**
* Status Methods.
*/
twitteroauth_header('Status Methods');
/* statuses/update */
date_default_timezone_set('GMT');
$parameters = array('status' => date(DATE_RFC822));
$status = $twitter->post('statuses/update', $parameters);
twitteroauth_row('statuses/update', $status, $twitter->http_code, $parameters);
/* statuses/show */
$method = "statuses/show/{$status->id}";
twitteroauth_row($method, $twitter->get($method), $twitter->http_code);
/* statuses/destroy */
$method = "statuses/destroy/{$status->id}";
twitteroauth_row($method, $twitter->delete($method), $twitter->http_code);
/* statuses/retweet */
$method = 'statuses/retweet/6242973112';
twitteroauth_row($method, $twitter->post($method), $twitter->http_code);
/* statuses/retweets */
$method = 'statuses/retweets/6242973112';
twitteroauth_row($method, $twitter->get($method), $twitter->http_code);
/**
* User Methods.
*/
twitteroauth_header('User Methods');
/* users/show */
$method = 'users/show/27831060';
twitteroauth_row($method, $twitter->get($method), $twitter->http_code);
/* users/search */
$parameters = array('q' => 'oauth');
示例3: array
/* direct_messages/new */
$parameters = array('user_id' => $user->id, 'text' => 'Testing out @oauthlib code');
$method = 'direct_messages/new';
$dm = $connection->post($method, $parameters);
twitteroauth_row($method, $dm, $connection->http_code, $parameters);
/* direct_messages */
$method = 'direct_messages';
twitteroauth_row($method, $connection->get($method), $connection->http_code);
/* direct_messages/sent */
$method = 'direct_messages/sent';
twitteroauth_row($method, $connection->get($method), $connection->http_code);
/* direct_messages/sent */
$method = "direct_messages/destroy/{$dm->id}";
twitteroauth_row($method, $connection->delete($method), $connection->http_code);
/* Some example calls */
//$connection->get('users/show', array('screen_name' => 'abraham'));
//$connection->post('statuses/update', array('status' => date(DATE_RFC822)));
//$connection->post('statuses/destroy', array('id' => 5437877770));
//$connection->post('friendships/create', array('id' => 9436992));
//$connection->post('friendships/destroy', array('id' => 9436992));
/* Include HTML to display on the page */
include('html.inc');