I’ve done this and so tired. I’ve been working on this for over a week now. My application is using a widget to display information. the user information is stored in a database and the widget reads from a couple of fields. I can’t access any data using app-only. I tested it with user only it worked. but this is for 1 user, i need to get all 312 user timeline.
//Twitter
elseif($_POST[‘platform’] == ‘twitter’):
$rate = @file_get_contents('http://api.twitter.com/1.1/account/rate_limit_status.json');
$rate = json_decode($rate);
if($rate->remaining_hits == 0):
$error = 'Sorry, rate limited';
else:
$account_data = @file_get_contents('http://api.twitter.com/1.1/users/show.json?screen_name='.$_POST['account_id'].'&include_entities=true');
$account_data = json_decode($account_data);
endif;
if($account_data != false):
$new_account = array(
'id' => $account_data->screen_name,
'username' => $account_data->screen_name,
'name' => $account_data->name,
'link' => 'http://twitter.com/'.$account_data->screen_name,
'picture' => $account_data->profile_image_url,
'platform' => 'twitter'
);
else:
$error = "Account Not Found";
endif;