Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling 1/help/test.json fails with "Could not authenticate with OAuth" #7

Closed
yusuke opened this issue Mar 4, 2011 · 1 comment
Closed
Assignees
Labels

Comments

@yusuke
Copy link

yusuke commented Mar 4, 2011

The following code fails with {"request":"/1/help/test.json","error":"Could not authenticate with OAuth."}:

require "./tmhOAuth.php";
$twitter = new tmhOAuth(array());

$twitter->request("GET", $twitter->url("1/help/test"));

print $twitter->response["response"];

reproducer: https://gist.github.com/854361

@themattharris
Copy link
Owner

Doing what you are doing will initialize the array with an empty consumer key, secret, user token and secret. By default request will always attempt to authenticate. If you don't want to authenticate you need to modify the call to request like this:
$twitter->request("GET", $twitter->url("1/help/test"), array(), false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants