0

Please make it clear at least

Sorry for my "rude" title but i love yql and the documentation somehow "sucks" when it comes to php. Ok not all of us use java... So, forgive me for my not so polite manner. smile.gif

What is the problem?

I start a new PHP application for Yahoo meme. I set the scope to READ/WRITE meme and i get my keys. So i have a file and i do:
CODE
<?php
if($_SESSION['hasSession'] == FALSE) {
// create the callback url,
$callback = 'http://www.example.com/';
// pass the credentials to get an auth url.
// this URL will be used for the pop-up.
$auth_url = YahooSession::createAuthorizationUrl(CONSUMER_KEY,CONSUMER_SECRET, $callback);

}else {
// pass the credentials to initiate a session
//The $_SESSION['session'] variable holds a serialized version of a session object retrieved by : YahooSession::requireSession(CONSUMER_KEY,CONSUMER_SECRET, APP_ID)
$token = unserialize($_SESSION['session']);
if($token) {
//up until here everything works ok
// Get the currently sessioned user.
$user = $token->getSessionedUser();

// Load the profile for the current user.
$profile = $user->getProfile();
}
}

if($_SESSION['hasSession'] == FALSE) {
?>
<p>Click on the image below.Confirm that you agree to connect your meme account to example and you will be redirected back here again.<br />
<a href="<?php echo $auth_url; ?>"><img src="template/images/yahoo.png" alt="Authenticate with Yahoo!" title="Click Here to Go to Yahoo!" /></a>
</p>
<?php
}else{
//This one works ok
$meme = $token->query('select * from meme.info where owner_guid=me');
//This one used to work 3 days ago. Now it seems dead
$r = $token->execute('INSERT INTO meme.user.posts (type, content) VALUES ("text", "Posting via my app");');
//The: $token->query('INSERT INTO meme.user.posts (type, content) VALUES ("text", "Posting via my app")'); does not work also

//this one saves the access tokens and the session
saveOathToken($tok->key,$tok->secret,$meme->query->results->meme->name,$_SESSION['session']);
}
?>


Could someone PLEASE help me out? I know you are very busy people but PLEASE someone give us some lights here... Generaly i see a lot of topics with 2 or 1 replies and thousands of views... Please don't dissapoint your audience cause it's big.

by
1 Reply
  • QUOTE (BILL @ Oct 30 2009, 11:42 AM) <{POST_SNAPBACK}>
    Sorry for my "rude" title but i love yql and the documentation somehow "sucks" when it comes to php. Ok not all of us use java... So, forgive me for my not so polite manner. :)$r = $user->execute('INSERT INTO meme.user.posts (type, content) VALUES ("text", "Posting via my app");');
    0

Recent Posts

in OAuth General Discussion YDN SDKs