Skip to content

Instantly share code, notes, and snippets.

@sekimura
Created March 26, 2009 22:05
Show Gist options
  • Save sekimura/86377 to your computer and use it in GitHub Desktop.
Save sekimura/86377 to your computer and use it in GitHub Desktop.
--- Simple.pm.orig 2009-03-26 15:04:19.000000000 -0700
+++ Simple.pm 2009-03-26 15:04:43.000000000 -0700
@@ -54,11 +54,13 @@
sub view_restricted_resource {
my $self = shift;
+ my ($url) = @_;
return $self->make_restricted_request($url, 'GET');
}
sub update_restricted_resource {
my $self = shift
+ my ($url, %extra_params) = @_;
return $self->make_restricted_request($url, 'POST', %extra_params);
}
1;
@@ -71,7 +73,7 @@
my $app = Net::AppThatUsesOAuth->new(%tokens);
# Check to see we have a consumer key and secret
- unless ($app->consumer_key && $app->consumer_key) {
+ unless ($app->consumer_key && $app->consumer_secret) {
die "You must go get a consumer key and secret from App\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment