Something like: echo $content-scree_name; will display the screen_name on
the page.
Abraham
-
Abraham Williams | Hacker Advocate | abrah.am
@abraham https://twitter.com/abraham | github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.
On Wed, Dec 8, 2010 at 05:27, roderick roderickstanda...@hotmail.comwrote:
Dear Twitter developers,
I finally created a good conenction with twitter etc, but now i get
this:
stdClass Object
(
[profile_background_image_url] =
http://s.twimg.com/a/1291318259/images/themes/theme14/bg.gif
[favourites_count] = 0
[show_all_inline_media] =
[geo_enabled] =
[notifications] =
[profile_sidebar_border_color] = ee
[profile_background_tile] = 1
[friends_count] = 104
[profile_image_url] = ###
[location] = ###
[follow_request_sent] =
[followers_count] = 31
[id_str] = ###
[lang] = en
[profile_background_color] = 131313
[url] = ###
[screen_name] = ###
[statuses_count] = 19
[time_zone] = Amsterdam
[profile_text_color] = ff6200
[listed_count] = 0
[following] =
[protected] =
[created_at] = Mon Aug 03 21:00:24 + 2009
[profile_link_color] = 188cc2
[description] = ###
[name] = ###
[contributors_enabled] =
[profile_use_background_image] = 1
[id] = ###
[verified] =
[utc_offset] = ###
[profile_sidebar_fill_color] = ebebeb
Now I want to display for example, thescreenname, amount of followers
etc. But How do i do that?
the codes that i alreayd have:
?php
/**
* @file
* User has successfully authenticated with Twitter. Access tokens
saved to session and DB.
*/
/* Load required lib files. */
session_start();
require_once('twitteroauth/twitteroauth.php');
require_once('config.php');
/* If access tokens are not available redirect to connect page. */
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']
['oauth_token']) || empty($_SESSION['access_token']
['oauth_token_secret'])) {
header('Location: ./clearsessions.php');
}
/* Get user access tokens out of the session. */
$access_token = $_SESSION['access_token'];
/* Create a TwitterOauth object with consumer/user tokens. */
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,
$access_token['oauth_token'], $access_token['oauth_token_secret']);
/* If method is set change API call made. Test is called by default.
*/
$content = $connection-get('account/verify_credentials');
/* Some example calls */
//$connection-get('users/show', array('screen_name' = 'abraham')));
//$connection-post('statuses/update', array('status' =
date(DATE_RFC822)));
//$connection-post('statuses/destroy', array('id' = 543780));
//$connection-post('friendships/create', array('id' = 9436992)));
//$connection-post('friendships/destroy', array('id' = 9436992)));
/* Include HTML to display on the page */
include('html.inc');
html.inc has following codes:
?php print_r($content); ?
Thank you in advance
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker:
http://code.google.com/p/twitter-api/issues/list
Change your membership to this group:
http://groups.google.com/group/twitter-development-talk
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group:
http://groups.google.com/group/twitter-development-talk