Search the Community
Showing results for tags 'epitwitter'.
-
Hey guys. I'm new here and pretty new to PHP. I know the basics of the language and can do most simple things, but I am working with Twitter in a project now and I have never worked with it before in terms of PHP. I have a PHP page that simply provides a link that the user clicks on to go to the Twitter page where they are asked to grant access to my application to use their Twitter. I do this through oAuth and this works as it should, returning a token. Upon granting access, a user is sent to a new PHP page which simply asks them to enter a search term. Once they enter a search term, I want to take that term and simply run it through the Twitter Search API. I then want to grab all of the IDs of the Tweets returned and store them. Here is the code that I have: <?php session_start(); ob_start(); include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; $oauth_token = $_POST['authtoken']; $search = $_POST['searchterm']; $tweets = $_POST['tweets']; $url = 'http://api.search.twitter.com/search.json?q='.$searchterm; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); $twitterObj->setToken($oauth_token); $token = $twitterObj->getAccessToken(); $twitterObj->setToken($token->oauth_token, $token->oauth_token_secret); $_SESSION['ot'] = $token->oauth_token; $_SESSION['ots'] = $token->oauth_token_secret; $twitterInfo = $twitterObj->get_accountVerify_credentials(); $twitterInfo->response; $creds = $twitterObj->get($url); ?> Now I'm stuck with what $creds is actually holding and how I will get the Tweet ID's out of it. I've tried a bunch of echo statements to attempt to figure it out, but I can't seem to get it. I feel like I'm close. Thanks for any help.