GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::TWITTER::ROLE::APPAUTH (3)

.ds Aq ’

NAME

Net::Twitter::Role::AppAuth - OAuth2 Application Only Authentication

CONTENTS

VERSION

version 4.01010

SYNOPSIS



  use Net::Twitter;

  my $nt = Net::Twitter->new(
      traits          => [API::RESTv1_1, AppAuth],
      consumer_key    => "YOUR-CONSUMER-KEY",
      consumer_secret => "YOUR-CONSUMER-SECRET",
  );

  $nt->request_token;

  my $tweets = $nt->user_timeline({ screen_name => Twitter });



DESCRIPTION

Net::Twitter::Role::OAuth is a Net::Twitter role that provides OAuth authentication instead of the default Basic Authentication.

Note that this client only works with APIs that are compatible to OAuth authentication.

METHODS

authorized True if the client has an access_token. This does not check the validity of the access token, so requests may fail if it is invalid.
request_access_token Request an access token. Returns the token as well as saving it in the object.
access_token Get or set the access token.
invalidate_token Invalidates and clears the access_token.

Note: There seems to be a Twitter bug preventing this from working---perhaps a documentation bug. E.g., see: <https://twittercommunity.com/t/revoke-an-access-token-programmatically-always-getting-a-403-forbidden/1902>

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::TWITTER::ROLE::APPAUTH (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.