Main menu
WalkswithMeAPI PHPYahoo Contact list reader with Oauth api in php

Yahoo Contact list reader with Oauth api in php

Now these days its very important to import contact list of users in our applications like share, invites etc. This can be done with many third party api’s but most of the people thinks that is not secure. That is why every one likes to use Oauth api .The main advantage of this is it will directly authenticate on the yahoo mail. So the security concern on yahoo list reader with Oauth api in php is 100%.

First you have to signup with the yahoo application center for getting yahoo contact list Oauth key for registering your application check here.

Yahoo contact list reader api in php

yahoo Oauth api registration

 

When you get the appId and secret key for your yahoo Oauth api.Now you can start integrating the api like follows.

First you have to download the yahoo contact list reader Oauth api config files from here.

Create a folder with yahoo_api and put these files inside that folder and create a php file for the user interface of yahoo contact list. copy and paste the following code.


<?php

require_once('yahoo_api/globals.php'); require_once('yahoo_api/oauth_helper.php'); $callback    =    "http://www.yourdomain.com/yahoo_callback.php"; /* Get the request token using HTTP GET and HMAC-SHA1 signature*/ $retarr = get_request_token(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, $callback, false, true, true);

if (! empty($retarr)){ list($info, $headers, $body, $body_parsed) = $retarr; if ($info['http_code'] == 200 && !empty($body)) { /* print "Have the user go to xoauth_request_auth_url to authorize your app\n" . rfc3986_decode($body_parsed['xoauth_request_auth_url']) . "\n"; echo "<pre/>"; print_r($retarr);*/ $_SESSION['request_token']  = $body_parsed['oauth_token']; $_SESSION['request_token_secret']  = $body_parsed['oauth_token_secret']; $_SESSION['oauth_verifier'] = $body_parsed['oauth_token']; echo $yahoo_link =  '<a href="'.urldecode($body_parsed['xoauth_request_auth_url']).'" >Yahoo Contact list</a>'; } }

?>

Then you have to create another file on the same path with yahoo_callback.php  and have the following codes on that page.


<?php

require_once('yahoo_api/globals.php'); require_once('yahoo_api/oauth_helper.php'); /* Fill in the next 3 variables.*/ $request_token               =   $_SESSION['request_token']; $request_token_secret   =   $_SESSION['request_token_secret']; $oauth_verifier                =   $_GET['oauth_verifier']; /* Get the access token using HTTP GET and HMAC-SHA1 signature */ $retarr = get_access_token_yahoo(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, $request_token, $request_token_secret, $oauth_verifier, false, true, true); if (! empty($retarr)) { list($info, $headers, $body, $body_parsed) = $retarr; if ($info['http_code'] == 200 && !empty($body)) { /*   print "Use oauth_token as the token for all of your API calls:\n" . rfc3986_decode($body_parsed['oauth_token']) . "\n"; */ /* Fill in the next 3 variables. */ $guid    =  $body_parsed['xoauth_yahoo_guid']; $access_token  = rfc3986_decode($body_parsed['oauth_token']) ; $access_token_secret  = $body_parsed['oauth_token_secret']; /* Call Contact API */ $retarrs = callcontact_yahoo(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, $guid, $access_token, $access_token_secret, false, true); echo "<pre/>"; print_r($retarrs); }}

?>

The yahoo Oauth method work flow will be like as follows.

yahoo Oauth api in php

yahoo Oauth api flow

demo_image                      Thanks for reading..

Download3617 downloads

143 thoughts on “Yahoo Contact list reader with Oauth api in php

  1. Sorry! I have done that but it’s showing me this(“consumer_key_rejected” ) could you please help me out for this As I followed all steps which mentioned in this link

  2. Hello ,
    From Where I’ll get these files

    require_once(‘yahoo_api/globals.php’);
    require_once(‘yahoo_api/oauth_helper.php’);

    1. Those are already included in the download package.
      check the bottom section of the article it have a download link. you can download the sample package.
      The script demo is not works due to my server setup changed recently but the script works fine.

      1. What i figured out ,here is problem can you help me to sort oyt this.

        Application Create failed. Scopes creation failed when creating App: 507

  3. Hello Sir,
    I use given code by you but there is some problem like that [http_code] => 400
    [2] => {“error”:{“xml:lang”:”en-us”,”yahoo:uri”:”\/fantasy\/v2?format=json&q=select%20%2A%20from%20fantasysports.draftresults%20where%20league_key%3D%22238.l.627060%22&view=compact”,”description”:”Resource not supported.”,”detail”:””}}.
    Please please please resolve this issues because i am very close to get fantasy sports related data.

    Thanks
    Pankaj Gurjar

  4. Thankyou very much for your code.It works fine..but there is a issue.
    Notice: Undefined index: port in /home/finalreview/public_html/projects/contacts_load/yahoo6/oauth_helper.php on line 154

    this error shown in the page.how to fix this sir?

    and there is another problem.In your code it shows only email address.can I get contact name also?

    this is my working example link..
    http://final-review.com/projects/contacts_load/yahoo6/

    1. When you print the array it will return name also , for testing purpose I just extract the email only.
      The port issue is only face in local machine usually when I check it in your demo link its work fine.

    2. Notice: Undefined index: port in D:\xampp\htdocs\yahoo\api\oauth_helper.php on line 154

      hello sir how to solve this error. how to come contact list please send me code please please

  5. after yahoo_callback.php
    then what
    how redirect it to connected.php to send mail to the email id that is fetch by api

  6. I Tried the code and its working fine but the issues I am having is open a popup for authorization and then get contacts list .
    Right now its redirecting the same page , is there any way to get it done with popup which ask users to login and the authorize them and once they are authorized contacts will be listed on parent page.

  7. getting same error result as same as your demo
    stdClass Object
    (
    [contacts] => stdClass Object
    (
    [contact] => Array
    (
    [0] => stdClass Object
    (
    [isConnection] =>
    [id] => 16777218
    [fields] => Array
    (
    [0] => stdClass Object
    (

  8. Does “TLS/SSL Connections Required for Calls to the Yahoo Contacts API” means that you must have a SSL Certificate on your website to be able to use the Yahoo Contact API?

  9. Yahoo Logo
    Will be right back…

    Thank you for your patience.
    Our engineers are working quickly to resolve the issue.

    On using walkswithme code.

    1. Make sure you create the APP with proper permission.
      The keys should be correct and return URL and app url should be same protocols.
      Then it should work

  10. Getting this issue “Cycle Prohibited – Description could not process your request for the document because it would cause an HTTP proxy cycle” in yahoo login.

    Please help me with this.

    Thanks in advance.

      1. I could not find your comments in older post for Cycle Prohibited issue, please give me link where you have mentioned the solution for this.

        Thanks

  11. I am facing this issue “Cycle Prohibited – Description could not process your request for the document because it would cause an HTTP proxy cycle” in yahoo login, if anybody have solution about this and plz help me out..

  12. I try to run demo link but got bellow error can you please help me what is the issue

    Cycle Prohibited

    Description: Could not process your request for the document because it would cause an HTTP proxy cycle. Please check the URL and your browser’s proxy settings.

    Thanks

    1. Hi,
      I am also suffering from same issue, and the given solution on other resource is that user has to clear cookies but its not working, and due to this issue of “Cycle Prohibited” my app is also not working fine, Please let us know how to solve it or please provide workaround solution for now!!!

      Thanks,

      1. Also face the same scenario in you given demo link !! so its from yahoo only or problem in developer app permission or access rights !!

      2. I think yahoo is modifying their API again !
        they did last modification just few months before It seems unstable compare to Google and hotmail API.

        Lets wait and ask in YDN

        TLS/SSL Connections Required for Calls to the Yahoo Contacts API

        To safeguard user data and authenticate API calls, we are limiting all access to the Yahoo Contacts API to secure SSL connections only. No user data will be accessible over HTTP from this date onwards. Thus, your applications must use SSL connections when making requests to https://social.yahooapis.com or https://query.yahooapis.com to access Yahoo contacts/profile data.

    1. This may happen due to bad port number means with SSL we use 443 and without SSL we use 80. based on yahoo last updated they moved Oauth API to SSL so port number is 443 and my script updated with that, Make sure you’re not customized core files.

      1. where do i do that or where do i change so that it will work..
        i change the port 80 to 443 and it is still not working..
        this error keeps on coming:

        A PHP Error was encountered

        Severity: Notice

        Message: Undefined index: port

        Filename: yahoo_api/oauth_helper.php

        Line Number: 154

  13. Hi

    Me and my friend Ullas had used used ur API for importing yahoo email accounts in our site.And it was working perfectly from 2013 September.
    Now everything going fine, but finally no email accounts importing.
    I checked your code in “globals.php” and i printed the response and i getting following result

    Array
    (
    [0] => Array
    (
    [url] => http://social.yahooapis.com/v1/user/HA7AE6E3YTYV5N72E35DFUG3DU/contacts;count=1000?format=json&view=compact

    Will be right back...
    Thank you for your patience.
    Our engineers are working quickly to resolve the issue.

    )

    Could you please explain why its not working.

    1. few months before Yahoo changed their port number and protocol for Oauth API.
      that is why this error I already updated my script based on that updates and works fine too.

      I think you missed that updates that why still getting error. Please download latest library and check everything .

      Better to subscribe for future update!

  14. I am getting following error when try to import yahoo contact.
    OAuth error:-
    Custom port is not allowed or the host is not registered with this consumer key.

    Thanks in advance.
    Devilal

      1. i get same error again.
        My yahoo auth application is following.
        Authentication Information: OAuth
        Application URL: http://templates2.seasiainfotech.com:9040/SocialDirectoryWebsit/yahoo_api/index.php
        Callback Domain: templates2.seasiainfotech.com
        I defined callback url in yahoo_callback file is following.
        $callback = “http://templates2.seasiainfotech.com:9040/SocialDirectoryWebsite/yahoo_api/index.php”
        As per my understanding it give error due to custom port in callback url.
        Kindly suggest,waiting for your reply.
        Thanks.
        DeviLal

      2. It give the same error.
        My yahoo app is following.

        Application URL:http://templates2.seasiainfotech.com:9040/SocialDirectoryWebsite/yahoo_api/index.php
        Callback Domain: templates2.seasiainfotech.com

        I have defined callback url in yahoo_callback.php file is
        $callback = “http://templates2.seasiainfotech.com:9040/SocialDirectoryWebsite/yahoo_api/index.php”;
        As per my understanding it give error due to custom port in callback url.
        kindly Suggest.waiting for reply.
        Thanks.
        DeviLal

  15. Hi jose your code sample working perfectly fine… i need one more thing can you help?
    I want to get my own email that imported contacts from yahoo. It returns contact only i need to get email account from which it is imported.

  16. Hello
    it seems the demo works fine but when i download the code i have problems.
    the result you can see here.
    please help. thanks!

  17. Hello , blank page results here too. Same with old script and same with the updated one.
    The demo is working fine.

      1. Thank You for your reply , i have tested other scripts and i the result was the same.
        Looks like in Europe is not working or is banned by Yahoo and they will never fix it.

  18. Hi! I appreciate your tutorial on yahoo contacts api. I tried but I do not see any results.

    Your callcontact_yahoo () function could have a problem with that. Can you post the correct file globals.php

    I expect a response from you

    Thank you

      1. Sorry for the mistake,

        Please change the globals.php

        foreach($values->contact as $keys=>$values_sub){
        $email = $values_sub->fields[1]->value;
        if(trim($email)!="")
        $newList .= $email.",";
        }

        Hope it works..

        1. Hi! Thank you for having responded to my message.
          Here is the area that I changed your file globals.php:

          foreach ($ yahoo_array as $ key => $ values​​) {
                         foreach ($ values​​-> contacts as $ keys => $ values_sub) {
          / / Echo '';
          / / Print_r ($ values_sub);
          / / echo $ values_sub-> fields [1] -> value-> givenName;
          if (is_object ($ values_sub-> fields [0] -> value))
          $ email = "";
          else
          $ email = $ values_sub-> fields [0] -> value;
          $ full_name = $ values_sub-> fields [1] -> value-> givenName;
          if (trim ($ email)! = "")
          $ newList = "div" $ full_name "------------" $ email "".....;

          }
          }

          I changed it as you rightly said this:

          foreach ($ values​​-> contacts as $ keys => $ values_sub) {
          $ email = $ values_sub-> fields [1] -> value;
          if (trim ($ email)! = "")
          $ newList = $ email ","..;
          }

          And my dear friend the result is still empty. This is far from being like your demo

          Can you please repost your file with all the adjustments can help us to tame this problem for us Reccurent apprentices.

          Hope to read a response from you

          1. hello my friend!

            I downloaded the file from your website but it’s the same result, you see a blank page

            I do not know but it is just waiting for a solution from you to make it work in our own project

        2. i download your zip file and upload it in my server it not work for me. Your json_decode($body) return empty contact arrray But when i try to use your demo i got result from this … What to do. Please suggest us .

          1. Yes I set up my id in

            define('OAUTH_CONSUMER_KEY', '--');
            define('OAUTH_CONSUMER_SECRET', '--');

            global.php file

  19. hey am a little confused here ,I have the app id and the shared secret bt I cant find the consumer secret and the consumer key , so where can i licate them??

  20. Hello Jobin jose,

    I have integrated the code ,but after login to yahoo & clicking “agree” button, I am getting empty screen,just empty array. I have checked the consumer key,secret id which are seems well. Can you please suggest the changes?

    P.S. you may check the output at http://betaci.newmeet.com/index_yahoo.com

    1. Did you set the redirect URI correctly (return url), this should be accessible via URL. The Oauth API return the verification Id to this URL.
      Also check your error_log

      1. Thanks for your reply jobin. I have already added call back url “http://betaci.newmeet.com/yahoo_callback.php”. but did not solved the issue.

  21. Hello,

    I got the following error: [oauth_problem] => token_rejected
    the url requestet is:

    https://api.login.yahoo.com/oauth/v2/get_token?oauth_consumer_key=dj0yJmk9NnNCS21XTWJ2OE1sJmQ9WVdrOVQzZ3pSV1V5TTJNbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD0zNQ–&oauth_nonce=1163058716&oauth_signature=ejBCG63J4uc2HJGI2E2ZIHCR8hw%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1403394650&oauth_token=hzre8qz&oauth_verifier=nmgwr2&oauth_version=1.0

    anyone have a clue? i certainly don’t.
    regards,

    1. This may happen token expiry like request more than one time.
      Or incorrect secret key and API key.
      Make sure you just changed the API key and Secret Key in the Downloaded package.

      1. Thank you so much for your reply!

        Of course i changed the authentification credentials, but you pointet me in the right direction by saying “may happen token expiry like request more than one time”.
        I requested the token on the page i showed the “get contacts” link, and a second time when i actually wanted to fetch the contacts by clicking on that link.

        At this point i get “WILL BE RIGHT BACK…” blabla but i think there’s just a link to change to a current one.

        thank you very much.
        regards,

        1. You mean after authenticate you’re showing a link to fetch contacts ? Then the token will get expired bcoz Oauth workflow is like that way.
          Another option is token file method , but Im not sure Yahoo Support it or not .

  22. Hi jobin jose
    I will tried what you are say but i am not getting result will you plz send me how to do that changes code.
    (check the callcontact_yahoo() it have the email parsing code , print the array and parse it according to the resulted array,
    for some reason it may happen but when you check the parsing section you can simply fix that.)

    Thank you,

    Regards,
    Chandu.

  23. Hi,
    I used your code and got it working,
    I needed additional info about the users, so I followed your advice and gave permissions in my app to get Contacts info as well as User profile info.

    I put in the newly generated customer key etc, but the data returned is the same as before.
    Can you please help me out.
    Here is how the o/p looks:
    stdClass Object
    (
    [contacts] => stdClass Object
    (
    ……….

  24. Hi jobin jose,
    i am getting
    Warning: Invalid argument supplied for foreach() in /home/publicad/public_html/yahoo_api/globals.php on line 291 some times it’s working perfectly and some other times it’s getting warning plz tell me the solution.

    Thanks,
    Regards,
    Chandu.

    1. check the callcontact_yahoo() it have the email parsing code , print the array and parse it according to the resulted array,
      for some reason it may happen but when you check the parsing section you can simply fix that.

  25. as i said there was a small change in function callcontact_yahoo . just change $response = do_get($request_url, 80, $headers); with $response = do_get($request_url, 443, $headers);
    in globals.php on line no 271 . thanks jobin jose for the script. Please make the changes in demo so that it start working.

  26. Array
    (
    )
    this is all it sends back. it looks like you are not reading the values sent by yahoo properly. Because if yahoo api server is down. how can it working well same time on facebook and cloudsponge.com . your script making the request properly but it is not able to read / display the result somehow.

      1. Hi Narayanan. I did that but still not working. Can you please send me the exact files and codes that you are using? (dualpha2 at gmail dot com).

        Tks!

      2. Thanks a lot! I had the same problem, empty array. made the changes you suggest and it functions. Thanks for the post!

    1. This code is Down for last one week Im not sure its bcoz of the code section.

      This happens before too, Two time the Yahoo Oauth is Down for more than a week many developers already reported the issue you can see the links on the comments , So I think yahoo will correct the issue soon, But I cannot also wait for that bcoz many plugin I already integrated with this code so all are down now.

      As per the Awais comment the cloudsponge is doing the things at this time too, So there will be another method available , I will check it and post to public ASAP.

  27. Hi,
    i am using your code. it was working fine and importing contacts properly. but after some days i check it again now it is not importing contacts. is there any updates in library plz help me. Thanks in advance

    1. Yahoo Oauth Service is Down last week, they are not yet fixed,
      Im also reported this as bug on Yahoo developer portal any fixes found i will update it ASAP,
      Only suggestion found is using https, but my script is already using that.

      So please be patience while fixing the issue from yahoo developers.
      check this link too
      http://developer.yahoo.com/forum/OAuth-General-Discussion-YDN-SDKs/http-social-yahooapis-com-Will-be-right-back/1395509802423-89faffa2-1503-486d-bc29-6505719bd774

  28. I have downloaded the files for api from here. But I am getting erors. The errors are:
    Invalid argument supplied for foreach() on line 293; and
    Invalid argument supplied for foreach() on line 34.

    Please help me….

    1. Yahoo Oauth Service is Down last week, they are not yet fixed,
      Im also reported this as bug on Yahoo developer portal any fixes found i will update it ASAP,
      Only suggestion found is using https, but my script is already using that.

      So please be patience while fixing the issue from yahoo developers.
      check this link too
      http://developer.yahoo.com/forum/OAuth-General-Discussion-YDN-SDKs/http-social-yahooapis-com-Will-be-right-back/1395509802423-89faffa2-1503-486d-bc29-6505719bd774

  29. hi,

    i cant retrieve any thing from the demo , no emails the error says “In some case for different yahoo id’s its return the array with differnt structure so it may case a warning with my parsing code but that doesn’t mean the code is not working you can parse the entire array below”

    also there is no array to see ????

    1. Sorry for the delay ,

      I was unable to check the code on past days, Now I checked the code its fine , the issue is not with the code , the error comes from yahoo server.

      I think yahoo modifying the Oauth API thats why this error came. You can check that by printing the JSon result. This happens before too.

  30. Hello Jobin, This tutorial is great. It works fine for me with the contacts http://manestate.com/manlogin/yahoo/contacts.php However I am not interested by the user contacts only by the user email address. How do I get it? I tried with the profile http://manestate.com/manlogin/yahoo/profile.php but it does not work. It is still showing authorization request for contacts. Where do I change to get the user email address? I have done that for google and facebook on my website http://manestate.com/ I would love to add the 800 million users of yahoo.

  31. your given code is working and I am able to extract my contacts but in addition to that at one place I need the user email also how to do it, any help ?

  32. your code is good
    however how to avoid or remove or strip blank email address or invalid email address without @ character… any idea..

    1. Thank you Zia,
      you can check the global.php callcontact_yahoo() for email id picking section.
      there is a foreach loop $values->contact parsing all name and email just put your conditions such as email validation there. Its done !

    1. I think your project creation on yahoo have some issue,
      Remove current project and add new , then verify the domain with file upload option the set the APP.

      It will work i didn’t find any other solution for this issue, I will keep checking ..

  33. Hi,

    I’m trying to implement the contacts retrieval from Yahoo. I’ve registered my project and verified my domain. So I have my AppID and my SharedSecret. I’ve passed them to the get_request_token() function but I’m getting the following:

    [1] => HTTP/1.1 401 Forbidden
    Date: Thu, 12 Dec 2013 15:54:12 GMT
    P3P: policyref=”http://info.yahoo.com/w3c/p3p.xml”, CP=”CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV”
    WWW-Authenticate: OAuth oauth_problem=consumer_key_unknown
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: application/x-www-form-urlencoded
    Cache-Control: private

      1. First of all, thank you very much jobin jose, I’m getting crazy. Here it is the url:

        [url] => https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_callback=http%3A%2F%2Fegasmoniz.dia.fi.upm.es%2Felgg%2Finvitefriends&oauth_consumer_key=ch3D.7HIkY6I7N6seaGNDjVB3uMDn6cr0pP40lSv_AfdWM6Y&oauth_nonce=1418719286&oauth_signature=Kcn7KhChM5r1aGEfJWiGppBRpjo%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1386948526&oauth_version=1.0
        [content_type] => application/x-www-form-urlencoded
        [http_code] => 401
        [header_size] => 459
        [request_size] => 724
        [filetime] => -1
        [ssl_verify_result] => 0
        [redirect_count] => 0
        [total_time] => 0.94286
        [namelookup_time] => 0.419455
        [connect_time] => 0.543738
        [pretransfer_time] => 0.795715
        [size_upload] => 0
        [size_download] => 34
        [speed_download] => 36
        [speed_upload] => 0
        [download_content_length] => -1
        [upload_content_length] => 0
        [starttransfer_time] => 0.942809
        [redirect_time] => 0
        [certinfo] => Array()
        [redirect_url] =>

    1. Its just a notice, the yahoo contact list returned may be little bit different than mine parsing codes that is the reason for this warning .

      Just parse email array with proper format it will work fine, I hope you already retrieved all the email id are array right ?.

      1. i have this code in your api, its work fine but it creates problem since yesterday.

        if (! empty($response)) {
        list($info, $header, $body) = $response;
        if ($body) {
        //logit(“callcontact:INFO:response:”);
        //print(json_pretty_print($body));
        $yahoo_array = json_decode($body);

        // echo “”;
        //print_r($yahoo_array);
        foreach($yahoo_array as $key=>$values){

        foreach($values->contact as $keys=>$values_sub){

        if(is_object($values_sub->fields[0]->value))
        $email = “”;
        else
        $email = $values_sub->fields[0]->value;

        if(trim($email)!=””)
        $newList .= “”.$email.””;

        }
        }

        }

        said problem in this line foreach($values->contact as $keys=>$values_sub){, but this right. please help and reply soon. thanx for your help.

        1. I already responded to Vinay to the same issue,

          In your case the Yahoo returned Json array is different that may happen due to the Apps permission you selected or .com,.co.in(email tail) etc.

          So just print the array and parse according to that when I tried several email Id , I can’t reach such a situation so unable to fix that in my email Id parsing code section.

          Simply parse according to your json array or send the printed array (as a file in mail) I will parse it for you.

          thanks.

  34. Hello and thank you for all codes of your website.

    I have a problem.

    When I use your demo, I recovered all the emails.

    But since my website, the page is blank.

    Yet I have to save the api, although transfered files. I just change the access key.

    I d’ont understand.

    help if you wound

    thank you

    1. Just need to download the zip file of Yahoo Contact list reader,

      Simply set your access key,secret key make sure your Yahoo Apps have proper access to read your data and the URL set to your domain is not issue with www and non-www .

      and simply follow the steps correctly , you should get the result,
      Also make sure your yahoo account have proper contact added, Check the error log if any errors.
      thanks for your feed back .
      let me know the status.

      1. thank for your reply
        now, when i use your demo, i have this message:

        stdClass Object
        (
        [error] => stdClass Object
        (
        [lang] => en-US
        [description] => Please provide valid credentials. OAuth oauth_problem=”signature_invalid”, realm=”yahooapis.com”
        )

        )

        1. I just noticed this issue from today,

          This issue is something like Yahoo Oauth Apps, Me and several other already reported it to Yahoo Developers,
          You guys can check the tread related to this on below links,

          http://developer.yahoo.com/forum/OAuth-General-Discussion-YDN-SDKs/signature-invalid-when-making-calls-to-the/1385735171123-8a38d8cf-815b-43ac-9d77-5bd2f2f60796
          or
          http://developer.yahoo.com/forum/Contacts/contacts-401-Oauth-signature-invalid-realm-yahooapis-com-/1385738377872-ec87c509-5054-4468-ac00-ff07f2905359
          or
          http://developer.yahoo.com/forum/OAuth-General-Discussion-YDN-SDKs/oauth-problem-signature-invalid-for-some-GEO-requests-/1367144588315-015ad9ea-46f7-49fe-9bc9-be807400e749

          Im also looking for the fix from Yahoo. also when i checked your links it will not return this error or any array so missed something double check again.
          I will post the fix ASAP.
          thanks.

      2. Hey jobin jose,

        thank for your source but i have the same problem, please can u give me the further information.
        The domain name and the url are http://www.furthermarket.com; these information are just because when i set the domain with just furthermarket.com, the verification of the domain name fail. thank in advance for your response.

        1. Did you created the APP corrects like without any conflict with WWW and non WWW ,
          The Domain verification failed means you have failed to upload a file to the server and verify,
          Please make sure your website have proper redirection for www and APP created with that , then you will be able to verify your domain.
          The yahoo Oauth is down for one week,Im also looking for the fix from Yahoo

  35. I also get the following errors:

    Undefined index: request_token in /var/www/html/yahoo_api/yahoo_callback.php on line 7 Notice: Undefined index: request_token_secret in /var/www/html/yahoo_api/yahoo_callback.php on line 8

    1. This is due to redeclaration of session in each pages just remove those session_start() from yahoo_callback.php and index.php page also you can remove the argv its for debug. but port is required its parsing url. Due to these errors the application never stuck , it will work just disable notices in global.php.
      make sure you added session only global.php and disabled the notice error or just use error_reporting(0); it will disable all errors.

      Please let me know the status ?
      thanks for your feed back 🙂

  36. Hi,

    Thanks for the tutorial but i keep getting the below erros. Kindly help.

    Notice: A session had already been started – ignoring session_start() in /var/www/html/yahoo_api/globals.php on line 2

    Notice: Undefined variable: argv in /var/www/html/yahoo_api/globals.php on line 11

    Notice: Undefined index: port in /var/www/html/yahoo_api/oauth_helper.php on line 154

  37. Warning: Invalid argument supplied for foreach() in /home2/walkswit/public_html/dev/yahoo_api/globals.php on line 291

    in demo..

    1. Thanks Vinay for noticing such an issue in the Yahoo contact list reader, It is casing because of different type of yahoo id i guess like co.in,com etc.
      Each time the yahoo oauth may return different formatted array in this case. So I just avoided my email id parsing section instead of that printing the entire result check it will works..
      Thanks once again 🙂

      1. hii works fine,but not extracting all email ids.instead of some email ids it returns names only.
        any fix for this?

        thanks,
        vinay.

        1. There are two situations that email not extract correctly in yahoo contact list reader.

          First one is when you import contact from any other mail services to yahoo , then creating yahoo app you have to assign that permission too.

          Second situation is one contact have more than one email assigned in the list, normally that will show as a comma separated string when you use my email parsing code ,otherwise print the entire array and parse it properly.
          Thanks for your feedback. 🙂

    1. Hello Vinay,

      Did you follow the steps correctly ? any errors shows on the error log ?
      Please share if any errors on the log file otherwise you don’t have any contact added on your yahoo mail.

      Please let me know how can i help you ?

    2. If you are following the steps correctly, You will get the result for easy and quick solution . Created a demo and Download patch for the yahoo contact list reader using oauth api in php.

      Just download the patch and set your keys and ID then check it will work perfectly.
      Please let me know the status ?

  38. The below given line has an error “PHP Fatal error: Using $this when not in object context”
    $retarr = $this->get_request_token(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET,
    $callback, false, true, true);

    Kindly help me to fix it.

    1. Hi Sumit, Thanks for reporting bugs.
      remove the $this-> from the function and download the config file once again i just updated the get_request_token function on globals.php.
      Please check now also let me know your issue get fixed.
      thanks 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

 

FacebookTwitterGoogle+RSS