0

PHP SDK ERROR HELP ME :(

unsure.gif

help me ....


Warning: First parameter must either be an object or the name of an existing class in /data/www/Yahoo-GA/yahoo-lib/Yahoo.php on line 1372

Warning: First parameter must either be an object or the name of an existing class in /data/www/Yahoo-GA/yahoo-lib/Yahoo.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /data/www/Yahoo-GA/weather.php:29) in /data/www/Yahoo-GA/yahoo-lib/Yahoo.php on line 343




in yahoo.inc 1372 code

if(property_exists($requestToken, "sessionHandle")) {
$parameters["oauth_session_handle"] = $requestToken->sessionHandle;
}


in yahoo.inc 343 code


function redirectForAuthorization($consumerKey, $consumerSecret, $callback = NULL, $sessionStore = NULL) {
$url = YahooSession::createAuthorizationUrl($consumerKey, $consumerSecret, $callback, $sessionStore);
if(!is_null($url)) {
header(sprintf("Location: %s", $url));
exit();
}
else {
// TODO: throw a YahooException
YahooLogger::error("Failed to create authorization URLs");
}
}

by
6 Replies
  • Hi Yang,

    Would you mind suppressing warnings in PHP to see if this solves the problem?

    For example:

    CODE
    <?php
    error_reporting(0);

    ....

    require('Yahoo.inc');
    $session = YahooSession::requireSession(
    'dj0yJmk9em5RQU8yNjZaTlZJJmQ9WVljsdjf7979872hNTldNbWNHbzlOVFE0TVRFNE9ETXomcz1
    jb25zdW1lcnNlY3JldCZ4PTFl',
    'b6ff8be978186498sdklfj8adc105fef71a2865911aeb',
    'http://example.com'
    );

    ...



    If you are able to redirect and log in after doing this, we can look at suppressing the warnings in the sdk that prohibit redirection.

    If suppressing warnings doesn't allow you to redirect and log in, we need to figure out why you're not getting a request token back from Yahoo!. Usually this is because your callback url doesn't match your app url and/or your key/secret are incorrect.

    BTW, are you seeing this inside a YAP app? YAP session handling is different than for OAuth apps, so please clarify.

    Thanks
    0
  • QUOTE (Erik @ Jul 19 2010, 09:54 AM) <{POST_SNAPBACK}>
    Hi Yang,

    Would you mind suppressing warnings in PHP to see if this solves the problem?

    For example:

    CODE
    <?php
    error_reporting(0);

    ....

    require('Yahoo.inc');
    $session = YahooSession::requireSession(
    'dj0yJmk9em5RQU8yNjZaTlZJJmQ9WVljsdjf7979872hNTldNbWNHbzlOVFE0TVRFNE9ETXomcz1
    jb25zdW1lcnNlY3JldCZ4PTFl',
    'b6ff8be978186498sdklfj8adc105fef71a2865911aeb',
    'http://example.com'
    );

    ...



    If you are able to redirect and log in after doing this, we can look at suppressing the warnings in the sdk that prohibit redirection.

    If suppressing warnings doesn't allow you to redirect and log in, we need to figure out why you're not getting a request token back from Yahoo!. Usually this is because your callback url doesn't match your app url and/or your key/secret are incorrect.

    BTW, are you seeing this inside a YAP app? YAP session handling is different than for OAuth apps, so please clarify.

    Thanks


    Dear Erik
    Thank you very much.

    This problem has been resolved last week.
    0
  • QUOTE (YangYi @ Jul 22 2010, 12:20 AM) <{POST_SNAPBACK}>
    Dear Erik
    Thank you very much.

    This problem has been resolved last week.


    Can you help me I am stuck with the same warning issues.
    0
  • Did you implement the instructions that Erik provided?

    - Jon
    0
  • can you tell us what is the solution?!<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(杨艺 @ 22 Jul 2010 1:20 AM)</cite></div><blockquote class="quotemain"><!--quoteo(post=17152:date=Jul 19 2010, 09:54 AM:name=Erik)--><div class="quote"><div class="quotetop">QUOTE <cite>(Erik @ Jul 19 2010, 09:54 AM) <a href="index.php?act=findpost&pid=17152">&lt;{POST_SNAPBACK}&gt;</a></cite></div><blockquote class="quotemain"><!--quotec-->Hi Yang,<br><br>Would you mind suppressing warnings in PHP to see if this solves the problem?<br><br>For example:<br><br><!--c1--><div class="code generic"><div class="codetop">CODE</div><pre class="codemain"><code><!--ec1--><!--?php<br>error_reporting(0);<br><br>....<br><br>require(&#39;Yahoo.inc&#39;);<br>$session = YahooSession::requireSession(<br> &#39;dj0yJmk9em5RQU8yNjZaTlZJJmQ9WVljsdjf7979872hNTldNbWNHbzlOVFE0TVRFNE9ETXomcz1<br>jb25zdW1lcnNlY3JldCZ4PTFl&#39;, <br> &#39;b6ff8be978186498sdklfj8adc105fef71a2865911aeb&#39;,<br> &#39;http://example.com&#39;<br>);<br><br>...--></code></pre></div><!--ec2--><br><br><br>If you are able to redirect and log in after doing this, we can look at suppressing the warnings in the sdk that prohibit redirection. <br><br>If suppressing warnings doesn&#39;t allow you to redirect and log in, we need to figure out why you&#39;re not getting a request token back from Yahoo!. Usually this is because your callback url doesn&#39;t match your app url and/or your key/secret are incorrect.<br> <br>BTW, are you seeing this inside a YAP app? YAP session handling is different than for OAuth apps, so please clarify.<br><br>Thanks<!--QuoteEnd--></blockquote></div><!--QuoteEEnd--><br><br>Dear Erik<br>Thank you very much.<br><br>This problem has been resolved last week.</blockquote></div>
    0
  • if you want<br><br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Hekmat @ 27 Sep 2011 3:48 AM)</cite></div><blockquote class="quotemain">can you tell us what is the solution?!<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(杨艺 @ 22 Jul 2010 1:20 AM)</cite></div><blockquote class="quotemain"><!--quoteo(post=17152:date=Jul 19 2010, 09:54 AM:name=Erik)--><div class="quote"><div class="quotetop">QUOTE <cite>(Erik @ Jul 19 2010, 09:54 AM) <a href="index.php?act=findpost&pid=17152">&lt;{POST_SNAPBACK}&gt;</a></cite></div><blockquote class="quotemain"><!--quotec-->Hi Yang,<br><br>Would you mind suppressing warnings in PHP to see if this solves the problem?<br><br>For example:<br><br><!--c1--><div class="code generic"><div class="codetop">CODE</div><pre class="codemain"><code><!--ec1--><!--?php<br>error_reporting(0);<br><br>....<br><br>require(&#39;Yahoo.inc&#39;);<br>$session = YahooSession::requireSession(<br> &#39;dj0yJmk9em5RQU8yNjZaTlZJJmQ9WVljsdjf7979872hNTldNbWNHbzlOVFE0TVRFNE9ETXomcz1<br>jb25zdW1lcnNlY3JldCZ4PTFl&#39;, <br> &#39;b6ff8be978186498sdklfj8adc105fef71a2865911aeb&#39;,<br> &#39;http://example.com&#39;<br>);<br><br>...--></code></pre></div><!--ec2--><br><br><br>If you are able to redirect and log in after doing this, we can look at suppressing the warnings in the sdk that prohibit redirection. <br><br>If suppressing warnings doesn&#39;t allow you to redirect and log in, we need to figure out why you&#39;re not getting a request token back from Yahoo!. Usually this is because your callback url doesn&#39;t match your app url and/or your key/secret are incorrect.<br> <br>BTW, are you seeing this inside a YAP app? YAP session handling is different than for OAuth apps, so please clarify.<br><br>Thanks<!--QuoteEnd--></blockquote></div><!--QuoteEEnd--><br><br>Dear Erik<br>Thank you very much.<br><br>This problem has been resolved last week.</blockquote></div></blockquote></div>
    0

Recent Posts

in YAP