當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TwitterOAuth::delete方法代碼示例

本文整理匯總了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');
開發者ID:woakes070048,項目名稱:TheSocialBoard,代碼行數:31,代碼來源:test.php

示例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');
開發者ID:ajireza,項目名稱:api-twitter,代碼行數:31,代碼來源:_test.php

示例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');
開發者ID:sagmahajan,項目名稱:aswan_release,代碼行數:29,代碼來源:index.php


注:本文中的TwitterOAuth::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。