jublo / codebird-php

Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.
https://www.jublo.net/projects/codebird/php
GNU General Public License v3.0
776 stars 234 forks source link

Posts twice when posting with Media #250

Closed MrSleeps closed 5 years ago

MrSleeps commented 5 years ago

So, I am trying a basic post image to Twitter via my company dashboard. I can get it to post, that isn't an issue. But it makes 2 posts of the same thing.. Text only posts don't.

Any ideas as to why this is happening? Code below

include_once('../vendor/jublonet/codebird-php/src/codebird.php');
$thisWeeksPic = "/path/to/thisweeks.jpg";
\Codebird\Codebird::setConsumerKey("Key", "Secret");
$cb = \Codebird\Codebird::getInstance();
$cb->setToken("token", "secret");

$params = array(
  'status' => 'Testing',
  'media[]' => $thisWeeksPic
);
$reply = $cb->statuses_updateWithMedia($params);
MrSleeps commented 5 years ago

Turns out it was nothing to do with my code, but a stupid browser extension. Simplest things..