Akenatehm Posted April 21, 2009 Share Posted April 21, 2009 Hey Guys, I am getting this error: Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')' in /home/livetwee/public_html/internal/index.php on line 81 with this: <?php case 'returned': /* If the access tokens are already set skip to the API call */ if ($_SESSION['oauth_access_token'] === NULL && $_SESSION['oauth_access_token_secret'] === NULL) { /* Create TwitterOAuth object with app key/secret and token key/secret from default phase */ $to = new TwitterOAuth($consumer_key, $consumer_secret, $_SESSION['oauth_request_token'], $_SESSION['oauth_request_token_secret']); /* Request access tokens from twitter */ $tok = $to->getAccessToken(); /* Save the access tokens. Normally these would be saved in a database for future use. */ $_SESSION['oauth_access_token'] = $tok['oauth_token']; $_SESSION['oauth_access_token_secret'] = $tok['oauth_token_secret']; } /* Random copy */ $content = 'your account should now be registered with twitter. Check here:<br />'; $content .= '<a href="https://twitter.com/account/connections">https://twitter.com/account/connections</a>'; /* Create TwitterOAuth with app key/secret and user access key/secret */ $to = new TwitterOAuth($consumer_key, $consumer_secret); $tok = $to->getRequestToken(); $request_link = $to->getAuthorizeURL($token); $tok = $to->getAccessToken(); $to = new TwitterOAuth($consumer_key, $consumer_secret, $user_access_key, $user_access_secret); $content = $to->OAuthRequest('https://twitter.com/account/verify_credentials.xml', array(), 'GET'); LINE 81 - >>$content = $to->OAuthRequest('https://twitter.com/statuses/update.xml', array('status' -> 'Test OAuth update. #testoauth'), 'POST'); /* Run request on twitter API as user. */ //$content = $to->OAuthRequest('https://twitter.com/account/verify_credentials.xml', array(), 'GET'); //$content = $to->OAuthRequest('https://twitter.com/statuses/update.xml', array('status' => 'Test OAuth update. #testoauth'), 'POST'); //$content = $to->OAuthRequest('https://twitter.com/statuses/replies.xml', array(), 'POST'); break; }/*}}}*/ ?> Link to comment https://forums.phpfreaks.com/topic/155016-solved-unexpected-t_object_operator/ Share on other sites More sharing options...
Mchl Posted April 21, 2009 Share Posted April 21, 2009 array('status' -> 'Test should be array('status' => 'Test Link to comment https://forums.phpfreaks.com/topic/155016-solved-unexpected-t_object_operator/#findComment-815331 Share on other sites More sharing options...
Akenatehm Posted April 22, 2009 Author Share Posted April 22, 2009 thanks for that. cody. Link to comment https://forums.phpfreaks.com/topic/155016-solved-unexpected-t_object_operator/#findComment-816016 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.