Skip to content

Instantly share code, notes, and snippets.

@yusuke
Created March 4, 2011 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusuke/854361 to your computer and use it in GitHub Desktop.
Save yusuke/854361 to your computer and use it in GitHub Desktop.
test.php
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<?php
// initialize tmhOAuth
require "./tmhOAuth.php";
$twitter = new tmhOAuth(array());
$twitter->request("GET", $twitter->url("1/help/test"));
print $twitter->response["response"];
?></body>
</html>
@themattharris
Copy link

the array requires the OAuth details to be configured. If you want to call the method unauthenticated you need to make the 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