First of all, congratulations for your work in this class. It's great! I already worked with others versions and they're all so complicated with lots of files and nonsense stuff. This one integrating all main OAuth options is awsome!
I'm having some problems with Microsoft and Yahoo authentication and I'm pretty sure that I'm passing wrong parameters for the method CallAPI. Here's my question: what's the URL and method to microsoft and yahoo? And also, what's the format of the "scope" for them?
I looked online and in your class documentation but I couldn't find them. :\
For Microsoft OAuth, I'm using this for now:
In this case, the authentication works, but I get this as user result:
"Content-Type" Content="text/html; charset=us-ascii">
HTTP Error 411. The request must be chunked or have a content length.
Matt Carpenter - 2012-10-02 14:17:34 - In reply to message 2 from Manuel Lemos
This is a really fantastic class. Thank you for all your work putting it together.
I, too, am having issues trying to use the Yahoo API. The initial authentication works fine, but then the API call fails with this error:
Error: it was not possible to retrieve the API call: authentication error: it was not requested any of the authentication mechanisms that are supported
This is code I am using to pull Yahoo contact data:
Arno Buizer - 2012-10-02 20:33:41 - In reply to message 3 from Matt Carpenter
I had those problems too and found out that format=json seems not to be supported by Yahoo (correctly)...
But the xml respons is not processed as I expect from the class. I only got the values, but not the keys or labels as I do get when using this class with Facebook,Google and Twitter!
I would be nice to have a working Yahoo example, especcially for setting the correct scope/permissions...
Maybe this reply helps you to work arround the strange behaviour with the json data request (mentioned in Yahoos'doc, but not working, even in their api TEST page!).
Manuel Lemos - 2012-10-03 12:21:13 - In reply to message 3 from Matt Carpenter
Did you check the access_token_error variable?
The API call may succeed in the sense there was not HTTP error, but the API may have returned a failure for some reason. The access_token_error variable returns the error including the response in most cases. Check that variable to see what is the error.
Manuel Lemos - 2012-10-03 21:13:33 - In reply to message 6 from Matt Carpenter
This is odd because if it returns the error you mention above, the error variable should be set to that error but in your output it seems to be empty. Have you changed anything between the call above and this last one?
Matt Carpenter - 2012-10-04 13:19:38 - In reply to message 7 from Manuel Lemos
The error is coming from the sasl.php file, although I haven't had a chance to trace it all the way through to figure out why. Just did a grep to find that error string. Nothing has changed with the function call that I posted. I did try setting format=xml, but that returned the same error.
Manuel Lemos - 2012-10-05 04:46:54 - In reply to message 8 from Matt Carpenter
No, the SASL library is not meant to be used. That is meant for regular authentication types. The OAuth class explicitly disables the SASL library use for authentication. Did you by any chance change the OAuth class to enabled the use of SASL library?
Arno Buizer - 2012-10-05 08:30:01 - In reply to message 9 from Manuel Lemos
maybe this errormesage (which I get via the return $userinfo) is related to this? (when trying to use the Yahoo interface)
"it was not possible to retrieve the OAuth request token: the SASL client class needs to be loaded to be able to authenticate and access this site"
I work with your latest oauth client and php versions, without modifications. (this already occured with the previous oauth client version)
I do not have further (debugging) details because of lack of time to spend on it... But I hope my observations help you guys to pin point possible problems in this library and/or the way we are using it now...
By the way, this lib already helped me to get this oauth functionality working in a relative short time! (I integrated the examples for Facebook and Google and Twitter in one piece of code, and all three work succesfull in a site I maintain for members of my church).
So thank you very much for creating this PHP OAuth API package!!!