当前位置: 首页>>代码示例>>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;未经允许,请勿转载。