0

Signature from YAP failed.

angry.gif

I create a Open Applications with php YDN,
but there is an Error

Signature from YAP failed.

so i can not get the sessionStore

I check the Consumer Key & Shared Secret sevel times ,there is no wrong!!


WHY???

WHO CAN HELP ME

by
4 Replies
  • Moving this to the YAP forum.

    Can you please provide the code snippet that you are using to try to use the sessionStore? Also - can you attach the full error dump that you are seeing in your logs from that error?

    Thanks.

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network
    Twitter: jcleblanc

    QUOTE (alla_jackson @ Aug 13 2009, 12:52 AM) <{POST_SNAPBACK}>
    :aWHO CAN HELP ME
    0
  • I'm having this same issue, I double checked the keys as well and they are both correct. Below is the output from the error log on my web server. If there is a way to get more information please let me know.

    [error] [client 69.147.114.108] Signature from YAP failed.

    thanks,

    -Rob
    0
  • Can you capture the full request from firebug or the full response as well please? A code sample of the request would help as well. There's not much I can do without that information.

    - Jon
    0
  • Here is the code I am using (minus my keys, which I did cut and paste from the site)

    function yahooSession(){
    App::import('Vendor','Yahoo',array('file'=>'yahoo/Yahoo.inc'));

    YahooLogger::setDebug(true);

    // Your Consumer Key (API Key) goes here.
    define('API_KEY', "");

    // Your Consumer Secret goes here.
    define('SHARED_SECRET', "");

    $yahoo_session = YahooSession::requireSession(API_KEY,SHARED_SECRET);

    return $yahoo_session;
    }

    My server logs the signature error when this function runs, and the session object is null. I would be happy to share the request from firebug with you, if I knew what request object you needed. There are about 12-15 requests generated when you try to load this application through the YAP preview area. This is an open application so I can't just run the php file off of my server directly.

    If it helps I was prompted to authorize this application after I generated the codes, but after that I have had no luck since then.
    0
  • If you're using the SDK with the customSessionStore class then you should use a slightly modified syntax. Try something like the following:

    CODE
    require_once('config.php');
    require_once("php_sdk/Yahoo.inc");
    require_once("CustomSessionStore.inc");

    //initialize and store the user token store
    $sessionStore = new CustomSessionStore();
    $session = YahooSession::initSession(KEY, SECRET, APPID, TRUE, CALLBACK, $sessionStore);


    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network
    Twitter: jcleblanc
    0
  • I'm not using a customSessionStore. The code I have is pretty much cut and paste straight from the documentation examples on the PHP SDK. The only difference is that my web server uses CakePHP as a framework so I have the code put into a Cake Component class that is called from the controller. (which is why I'm using App::import() to get the Yahoo.inc file included).

    I did a var_dump on the POST part of the request from when I do a preview in the YAP developer area. Hopefully it may help you figure out what is going wrong.

    array(13) { ["yap_consumer_key"]=> string(108) "dj0yJmk9bWFSTGNOY2VleGsyJmQ9WVdrOVZ6ZHBkR3N5TXpJbWNHbzlNVFU0TmpJMU56azFPUS0
    tJnM9Y29uc3VtZXJzZWNyZXQmeD02NQ--" ["yap_viewer_access_token"]=> string(814) "A=R9InHpPQphuj8iMpy7v2Efp5VpVvD0h5WTw1HjtJe4AmPA9Jyw2GXih2qq.H4VfCLYO7YZjHE
    RnbTvucsDE1_Vj2c6Jokctn3fOWUyDgEmLn2pWKZVRFfxEwQbCQKSMs2hIxqrt2lM3gZbn1hQ24VoRTI.
    Lxhlrek5Y5wpfHa9TDUiF9Lkhs1HKKBfFxF8826YRS5tb8rKqujwvr_l4wSqoauESiGX_7YR9re7Nfo21
    QSjX2NmCKqcEojUrcU5fq0Fysh_zrxOmR241S7qQuk7oevgDa9ORdTauhJA13yOrNYjVMsVsn7qH30MHm
    AUL1AaLjbMk8FL.fvALDKpP2UKxTle733X2nM4jLj4t9o.XBZBTOc7QN1JF7RLiw_gbTWh.o2ZZBmf9R_
    H2HbpAmM9Pu4HVGtXslDbFyINqzMRKTr3UguAQJMUKrF_gooVYJN0f.K0W66pKTRPLGavpeIdJ_jTzuTp
    OIaC5IKuYYkanbQPk8AuK8E46U8tAwCrckcqIyeN.pSOVriPtZ.aYqQdFeqJi2N1UymG9y9EEKX2xW9p8
    caoMuW.ruwuB418kUxN76TN_DoWuh1qccoCo0KSxqPdAd5X9DFwFu8ox9wNtLFswFkEdJ7gAnQoTb6L2c
    p1J1sUaff6OzEupDgHZW63lREUONF_7wR5WD1AHqwI6HUcFP76h2zzAiyJVtotwih145SJ3xnE5YpEZkn
    A.mUVyDZ2uqF1OS3w8TzaUoQvqVkL_kWcYmDnwXBYCpABzvIHMHq05FAee.rAwGscPTlzmstV5KbRsq1r
    H7lGbfLpI-" ["yap_viewer_access_token_secret"]=> string(40) "59c19029fa634f8de3fce093b7a3c5269766d879" ["yap_viewer_guid"]=> string(26) "RCDZGCVN3DRGAFBPXY2UKFWI64" ["yap_owner_guid"]=> string(26) "RCDZGCVN3DRGAFBPXY2UKFWI64" ["yap_tz"]=> string(19) "America/Los_Angeles" ["yap_jurisdiction"]=> string(2) "US" ["yap_appid"]=> string(8) "W7itk232" ["yap_dropzone_id"]=> string(0) "" ["yap_view"]=> string(13) "YahooFullView" ["yap_time"]=> string(10) "1252506999" ["oauth_signature_method"]=> string(9) "HMAC-SHA1" ["oauth_signature"]=> string(28) "4FTYc6x74K2CSzyPHSh3rgC4wfI=" }


    thanks for all the help so far.
    0
  • Hi Rob,

    The actual PHP request looks fine. Are you using the most current PHP SDK from http://github.com/yahoo/yos-social-php/tree ? A month or two back there was a revision to include a new version of OAuth. There is a difference between the OAuth signatures of an Open app and an OAuth app so I'll also need to do some signature comparison there. If this was created through the PHP SDK though it should be valid.

    - Jon

    QUOTE (Rob @ Sep 9 2009, 06:41 AM) <{POST_SNAPBACK}>
    I'm not using a customSessionStore. The code I have is pretty much cut and paste straight from the documentation examples on the PHP SDK. The only difference is that my web server uses CakePHP as a framework so I have the code put into a Cake Component class that is called from the controller. (which is why I'm using App::import() to get the Yahoo.inc file included).

    I did a var_dump on the POST part of the request from when I do a preview in the YAP developer area. Hopefully it may help you figure out what is going wrong.

    array(13) { ["yap_consumer_key"]=> string(108) "dj0yJmk9bWFSTGNOY2VleGsyJmQ9WVdrOVZ6ZHBkR3N5TXpJbWNHbzlNVFU0TmpJMU56azFPUS0
    tJnM9Y29uc3VtZXJzZWNyZXQmeD02NQ--" ["yap_viewer_access_token"]=> string(814) "A=R9InHpPQphuj8iMpy7v2Efp5VpVvD0h5WTw1HjtJe4AmPA9Jyw2GXih2qq.H4VfCLYO7YZjHE
    RnbTvucsDE1_Vj2c6Jokctn3fOWUyDgEmLn2pWKZVRFfxEwQbCQKSMs2hIxqrt2lM3gZbn1hQ24VoRTI
    .
    Lxhlrek5Y5wpfHa9TDUiF9Lkhs1HKKBfFxF8826YRS5tb8rKqujwvr_l4wSqoauESiGX_7YR9re7Nfo2
    1
    QSjX2NmCKqcEojUrcU5fq0Fysh_zrxOmR241S7qQuk7oevgDa9ORdTauhJA13yOrNYjVMsVsn7qH30MH
    m
    AUL1AaLjbMk8FL.fvALDKpP2UKxTle733X2nM4jLj4t9o.XBZBTOc7QN1JF7RLiw_gbTWh.o2ZZBmf9R
    _
    H2HbpAmM9Pu4HVGtXslDbFyINqzMRKTr3UguAQJMUKrF_gooVYJN0f.K0W66pKTRPLGavpeIdJ_jTzuT
    p
    OIaC5IKuYYkanbQPk8AuK8E46U8tAwCrckcqIyeN.pSOVriPtZ.aYqQdFeqJi2N1UymG9y9EEKX2xW9p
    8
    caoMuW.ruwuB418kUxN76TN_DoWuh1qccoCo0KSxqPdAd5X9DFwFu8ox9wNtLFswFkEdJ7gAnQoTb6L2
    c
    p1J1sUaff6OzEupDgHZW63lREUONF_7wR5WD1AHqwI6HUcFP76h2zzAiyJVtotwih145SJ3xnE5YpEZk
    n
    A.mUVyDZ2uqF1OS3w8TzaUoQvqVkL_kWcYmDnwXBYCpABzvIHMHq05FAee.rAwGscPTlzmstV5KbRsq1
    r
    H7lGbfLpI-" ["yap_viewer_access_token_secret"]=> string(40) "59c19029fa634f8de3fce093b7a3c5269766d879" ["yap_viewer_guid"]=> string(26) "RCDZGCVN3DRGAFBPXY2UKFWI64" ["yap_owner_guid"]=> string(26) "RCDZGCVN3DRGAFBPXY2UKFWI64" ["yap_tz"]=> string(19) "America/Los_Angeles" ["yap_jurisdiction"]=> string(2) "US" ["yap_appid"]=> string(8) "W7itk232" ["yap_dropzone_id"]=> string(0) "" ["yap_view"]=> string(13) "YahooFullView" ["yap_time"]=> string(10) "1252506999" ["oauth_signature_method"]=> string(9) "HMAC-SHA1" ["oauth_signature"]=> string(28) "4FTYc6x74K2CSzyPHSh3rgC4wfI=" }


    thanks for all the help so far.
    0
  • Hey,

    Could I take a look at the contents of $_REQUEST

    var_dump($_REQUEST);

    QUOTE (alla_jackson @ Aug 13 2009, 12:52 AM) <{POST_SNAPBACK}>
    :aWHO CAN HELP ME
    0

Recent Posts

in YAP