Posting as user instead of App (status/update)

php

#1

I’ve been able to post with my app twitter id fairly easily. However, when I try to post as my users account, I get “Error 32: Could not authenticate”. I’ve double checked my tokens & token_secrets. I have asked for read&write permissions for the user and have the proper tokens for each as well. I simply can’t get it to work without the Error 32 showing up.

I’m fairly new to the Twitter Rest API, and I haven’t been able to find any answers on the web to the following questions.

  1. Is there a “sandbox” that doesn’t allow me to post as the user if I am a new app?
  2. Do I need special “master” approval to post as the user instead of as the app?
  3. What tokens should I be switching? Consumer or Access? (I’ve tried switching both to no avail)

Any help or advice in making this happen would be greatly appreciated. Thank you for taking the time to read this.


#2

Anyone know how to post as your users…still getting an error on this and need suggestions.


#3

The user has to allow your app to post on their behalf (it usually happens when they start using the app with their Twitter account for the first time), then it’s usually fairly easy to post from the app using their access token.

Could you provide more details on your problem though? Like what are you using to develop your app (and to access the Twitter API), what exactly did you do (write in the code) to post as a user? Then I might be able to give some more exact advice, but right now it’s a bit hard to help…


#4

Thanks for the response. Everything seems to work until I try to swap my access code with the users access code. I can post as the app itself, but not the user.

I have requested and received the users access token to post on their behalf. I’m using the PHP twitter library. To post, I am simply using an if statement that says “If user has access token, use the user access token. Else use the app access token.” This causes the “Error 32: Could not authenticate” message that I stated above…even though I have quadruple checked the access tokens are correct.

Any guidance or help would be appreciated. I’ve found the web to be lacking in help.