milfs/toa/datos.php

31 lines
1.2 KiB
PHP
Raw Permalink Normal View History

<?php
ini_set('display_errors', 1);
require 'autoload.php';
use Abraham\TwitterOAuth\TwitterOAuth;
/*
define('CONSUMER_KEY', getenv('wMtivKDSAgZmkP7EZhYcfw'));
define('CONSUMER_SECRET', getenv('AvWbHfjuSJkZYhkxsU8ojsDpNtvapBoiRUzwF3OAvbo'));
define('OAUTH_CALLBACK', getenv('http://datos.labmde.org/milfs/toa/hola.php'));
*/
define('CONSUMER_KEY', 'wMtivKDSAgZmkP7EZhYcfw');
define('CONSUMER_SECRET', 'AvWbHfjuSJkZYhkxsU8ojsDpNtvapBoiRUzwF3OAvbo');
define('OAUTH_CALLBACK', 'http://datos.labmde.org/milfs/toa/test.php');
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
//print $connection; //print connection contents
//$request_token = $connection->oauth('oauth/request_token', array('oauth_callback' => OAUTH_CALLBACK));
$request_token = $connection->oauth('oauth/request_token');
//$url = $connection->url('oauth/authorize', array('oauth_token' => $request_token['oauth_token']));
$user = $connection->get("account/verify_credentials");
//print $user->screen_name;
print_r($user);
// Post Update
$content = $connection->post('statuses/update', array('status' => 'Bonito dia'));
print_r( $content);
print_r($url);
//print_r($request_token); //print connection contentsa
?>