Permalink
Browse files

alter bit.ly shorten YQL query to use standalone class, rather than g…

…enerate a new session obj
  • Loading branch information...
zagraves committed Jan 26, 2010
1 parent 26a4185 commit 6fe832f881c925cfd21a8e7a5a225af8016e883f
Showing with 4 additions and 2 deletions.
  1. +1 −0 yupdates.php
  2. +3 −2 yupdates_utils.php
View
@@ -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");
View
@@ -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;

0 comments on commit 6fe832f

Please sign in to comment.