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

Error 32 - Could not authenticate you. #202

Closed gintechsystems closed 7 years ago

gintechsystems commented 7 years ago

I have googled around and keep receiving this error but unsure why at this point. I tried even hard coding my tokens and secrets but still receive the error message "Could not authenticate you.". I am not saying the library is the issue, but was curious if others were receiving this issue?

I have made sure my app has write permissions, I am passing a valid access token & secret & that my app consumer key / secret is correct.

Can I not use the same twitter account that I used to create the app? I am passing my access token / secret from my iOS app, this works with Facebook so I figured Twitter would too. I am able to upload media (using remote url) and get a response but when I try to post a tweet is when I get the auth error.

Any thoughts or suggestions would be appreciated.

gintechsystems commented 7 years ago

Latest Update:

I have verified that the user is logged in using account_verifyCredentials(), I will post the rest of my code to see if it is that or a bug going on here.

gintechsystems commented 7 years ago

Final Update:

Apparently if you only pass one media_id you can't have it in an array? I had this:

$response = $this->twitClient->statuses_update([ 'status' => $caption, 'media_ids' => array($mediaId) ]);

But fixed this issue doing this:

$response = $this->twitClient->statuses_update([ 'status' => $caption, 'media_ids' => $mediaId ]);