خرید بک لینک

Vote count: 0

I'm trying to access yahoo finance data via oauth so I can make more requests.

I got a php library to do this: https://github.com/isaacs/authentipede

Unfortunately, I can't seem to get permission. Here is my code:

<?php 
echo '<p>HEY IM GREG</p>'; 

$ff = 'abocym6j4p6';
$my_var = file_get_contents("http://finance.yahoo.com/d/quotes.csv?s=GOOGL&f={$ff}");
$my_var2 = file_get_contents("http://ichart.finance.yahoo.com/table.csv?s=GOOGL&c=20151202");
echo $my_var;
echo $my_var2;



include_once("authentipede/yahoo/yosdk/lib/Yahoo.inc");
echo '<p>HEY IM GREG2</p>'; 

define("API_KEY","dj0yJmk9ZU5ITVZWRURPTE83JmQ9WVdrOVZuRmljM2MwTjJzbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD05MA--");
define("SHARED_SECRET","2f50632804e455b1c51d438ef9ec019c93d2be38");
echo '<p>HEY IM GREG3</p>'; 

YahooLogger::setDebug(true);
$twoleg = new YahooApplication (API_KEY, SHARED_SECRET);
echo $twoleg;

$query = "select * from yahoo.finance.historicaldata where symbol ="YHOO" and startDate = "2011-12-01" and endDate = "2011-12-04"";
echo $query;

$results = $twoleg->query ($query);
echo '<p>HEY IM GREG4</p>'; 
echo ($results);

?>

The first to variables $my_var and $my_var2 both print out fine (these are using the public api, not oath).

After that, the code seems to work up until 'HEY IM GREG3' .... but nothing after that. The echo $twoleg doesn't show, so I'm guessing that for some reason my oauth credentials aren't working.

Any thoughts?

asked 47 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 12 مرداد 1395 ساعت: 8:22

صفحه بندی