Skip to content

Instantly share code, notes, and snippets.

View shohil-kishore's full-sized avatar

Shohil Kishore shohil-kishore

View GitHub Profile
@shohil-kishore
shohil-kishore / twitter-application-only-auth.php
Created July 23, 2018 23:07 — forked from lgladdy/twitter-application-only-auth.php
A working example of Twitter's new application-only auth, written in PHP.
<?php
//This is all you need to configure.
$app_key = '';
$app_token = '';
//These are our constants.
$api_base = 'https://api.twitter.com/';
$bearer_token_creds = base64_encode($app_key.':'.$app_token);