1
私はこのライブラリhttps://github.com/J7mbo/twitter-api-phpを使用してTwitter APIを使用しています。POSTメソッドのID intの制限
私は正常に動作GET(showids.php)を使用して、ツイートのIDを渡すために.CSVを使用しています:
<?php
require('TwitterAPIExchange.php');
require("auth.php");
$fichero=fopen("tweets.csv","r");
while(!feof($fichero)){
$linea=fgets($fichero);
$id=(substr($linea,1,18));
echo ($id."<br />");
$url = "https://api.twitter.com/1.1/statuses/show.json";
$requestMethod = "GET";
$getfield = '?id='.$id;
$twitter = new TwitterAPIExchange($settings);
$response = $twitter->setGetfield($getfield)
->buildOauth($url, $requestMethod)
->performRequest();
print_r($response);
echo("<br />");
}
fclose($fichero);
を私はPOSTメソッド(delids.php)を使用する場合には、ツイートをカットIDはint limitになります。エラーと
<?php
require('TwitterAPIExchange.php');
require("auth.php");
$fichero=fopen("tweets.csv","r");
while(!feof($fichero)){
$linea=fgets($fichero);
$tid=substr($linea,1,18);
echo ($tid."<br />");
$url = sprintf('https://api.twitter.com/1.1/statuses/destroy/%d.json',$tid);
echo ($url."<br />");
$method = 'POST';
$params = array(
'id'=>$tid,
);
$twitter = new TwitterAPIExchange($settings);
echo $twitter->buildOauth($url,$method)
->setPostfields($params)
->performRequest();
echo("<br />");
}
fclose($fichero);
IMG:
$url = 'https://api.twitter.com/1.1/statuses/destroy/'.$tid.'.json');
私が思うに動作するはずです:int limit
はい!それでおしまい!ありがとう! :D(私は本当にf **私がそれを見ていない方法を知らない...) –
笑、私たちの最高に起こる^^目の新鮮なペアは時々助けます。私はあなたの状況のやり方で何回も過ごしました:D – Jester