Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
alter bit.ly shorten YQL query to use standalone class, rather than g…
Browse files Browse the repository at this point in the history
…enerate a new session obj
  • Loading branch information
zagraves committed Jan 26, 2010
1 parent 26a4185 commit 6fe832f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions yupdates.php
Expand Up @@ -51,6 +51,7 @@

require_once("lib/OAuth/OAuth.php");
require_once("lib/Yahoo/YahooOAuthApplication.class.php");
require_once("lib/Yahoo/YahooYQLQuery.class.php");

// require_once("yupdates_application.php");
require_once("yupdates_sessionstore.php");
Expand Down
5 changes: 3 additions & 2 deletions yupdates_utils.php
Expand Up @@ -192,8 +192,9 @@ function yupdates_bitly_shorten($permalink, $apiKey, $login)
$query = "SELECT statusCode, results FROM bit.ly.shorten where login='%s' and apiKey='%s' and longUrl='%s' and history='1'";
$query = sprintf($query, $login, $apiKey, $permalink);

$session = yupdates_get_session();
$rsp = $session->application->yql($query);
// $session = yupdates_get_session();
$yql = new YahooYQLQuery();
$rsp = $yql->query($query);

$bitly = $rsp->query->results->bitly;

Expand Down

0 comments on commit 6fe832f

Please sign in to comment.