With registered webhook, I’m getting string(0) “” response instead of code 204 .
$url = “https://api.twitter.com/1.1/account_activity/webhooks/$webhook_id/subscriptions.json”;
$requestMethod = ‘POST’;
$postfields = array();
$settings = array(
‘oauth_access_token’ => ACCESS_TOKEN,
‘oauth_access_token_secret’ => ACCESS_TOKEN_SECRET,
‘consumer_key’ => CONSUMER_KEY,
‘consumer_secret’ => CONSUMER_SECRET
);
$twitter = new TwitterAPIExchange($settings);
$statuses = $twitter->buildOauth($url, $requestMethod)
->setPostfields($postfields)
->performRequest();
var_dump($statuses);
The auth is OK, I can get account/verify_credentials.json, account_activity/webhooks.json without any problem.