Hi,
The escape quotes are because they are printed from php so it is not causing any trouble after it has been parsed.
Basically is the following code that I use for testing at the moment as to avoid unnecessary complexity.
<?php
// Include the PHP SDK to access library
require_once("yosdk/lib/Yahoo.inc");
// Define constants to store your API Key (Consumer Key) and Shared Secret (Consumer Secret)
define("API_KEY","API KEY");
define("SHARED_SECRET","SECRET");
// Initializes session and redirects user to Yahoo! to sign in and then authorize app
$yahoo_session = YahooSession::requireSession(API_KEY, SHARED_SECRET);
YahooLogger::setDebug(false);
// The YahooSession object $yahoo_session uses the method getSessionedUser to get a YahooUser object $yahoo_user
$yahoo_user = $yahoo_session->getSessionedUser();
// With the YahooUser object, the user profile is obtained with the method loadProfile.
$user_profile = $yahoo_user->loadProfile();
$nickname = $user_profile->nickname;
$user = $user_profile->guid;
echo $user;
?>
Thanks,
Ok I was running your sample and there are a few things. First, when you were escaping some of your strings (like in your data obj), that was producing a "Malformed identifier" error. In the sample those escaped quotes are not needed. I'm seeing that the AJAX request is failing but without seeing the content of ajax.php I don't know why. Can you provide the code in that file please? As mentioned in post #5, if you are instantiating a 3-legged OAuth session with an automatic makeRequest javascript call, you will run into issues. If you switch to 2-legged that will not cause you a problem.
Thanks,
Jon