Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 673869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:38:36+00:00 2026-05-14T00:38:36+00:00

Im using curl to fetch my Twitter favorites: <?php $username = bob; $password =

  • 0

Im using curl to fetch my Twitter favorites:

<?php
$username = "bob";
$password = "password";
$twitterHost = "http://twitter.com/favorites.xml";
$curl;
$curl = curl_init();
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($curl, CURLOPT_URL, $twitterHost);
$result = curl_exec($curl);
curl_close($curl);
header('Content-Type: application/xml; charset=ISO-8859-1');
print $result;
?>

However this only fetches the last 20 favorites, not all of them.

If i amend this line:

$twitterHost = "http://twitter.com/favorites.xml";

And change it to:

$twitterHost = "http://twitter.com/favorites.xml?page=2";

I can get the next set of 20 favorites.

There doesnt appear to be anyway, using the Twitter API, to find out how many pages of favorites there are.

As such can anyone suggest the best way to get all favorites?

Or if this is not possible, get all the Tweets for a date range?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:38:36+00:00Added an answer on May 14, 2026 at 12:38 am

    You should be able to call this API function:

    http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users%C2%A0show

    This API call “users/show” returns an attribute “favourites_count” which has this information. For example, go to this page to see, replacing “bob” with your username:

    http://api.twitter.com/1/users/show/bob.xml

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using PHP cURL to fetch XML output from a URL. Here is
I'm using cURL to get the XML file for my Twitter friend's timeline. (API
I am using PHP + CURL to fetch data from a server in one
I'm using PHP cURL to fetch information from another website and insert it into
I am using PHP CURL to fetch data from a server. The response can
Example: http://www.whois.net/whois/hotmail.com When open in browser, output is shown. When using curl call, it
Im using curl through php to fetch a url. I am successfully able to
I'm working towards sending an XML request to a URL using cURL in PHP.
I'm using CURL to fetch some data from user accounts. First it logs in
I'm using curl to fetch some data from a website. After I process it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.