Net::Twitter::Role::AppAuth(3pm)

Net::Twitter::Role::AppAuth3pm

Oauth2 application only authentication

Usage

  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' });

Version

version 4.01043

Overview

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>

Releases

5 releases since Debian 9 (Stretch); the text changed 2 times.

  1. 9
  2. 10–11
  3. 12–13

From libnet-twitter-perl 4.01043-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.