Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 25, 2015 @ 12:49
    Ismail Mayat
    0

    Twitter api limits

    Anders,

    We are using skybrud in the context of a console app, this app will get for about 300 people potential 4 lots of data, twitter,facebook,instagram and youtube.  For twitter there is 

    TwitterFollowers
    TwitterTweets
    TwitterFollowing
    TwitterFavourites
    LatestTweet

    I know that twitter api has rate limits https://dev.twitter.com/rest/public/rate-limits also when you call twitter endpoints they do send back how many calls you have left, does skybrud expose that information? If not I guess I can look at the end points I am calling via skybrud then make some calculations and make batched staggered requests.

    This is console app running over night so no issues with timeouts etc.

    Regards


    Ismail

  • Anders Bjerner 487 posts 2996 karma points MVP 8x admin c-trib
    Feb 25, 2015 @ 14:00
    Anders Bjerner
    1

    Hi Ismail,

    Rate limiting information is currently not exposed directly in Skybrud.Social. Each Twitter response class has a Response property, which is a reference to an instance of SocialHttpResponse. This class then has a Headers property from which you can read the rate limiting information manually.

    I have created an issue on GitHub, and will see if I can implement it the next time I'm working on Skybrud.Social ;)

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 25, 2015 @ 14:49
    Ismail Mayat
    0

    Anders,

    Cool, for now what I have done is determined which apis i call and its 2 and they have 180 and 300 limit in 15mins, so i will just batch in 180 over 15mins.

    Regards

    Ismail

  • Anders Bjerner 487 posts 2996 karma points MVP 8x admin c-trib
    Feb 25, 2015 @ 21:56
    Anders Bjerner
    101

    Hi Ismail,

    Rate limiting information is now exposed in the latest code in the repository. You can use it like this:

    TwitterStatusMessageResponse response = service.Statuses.GetStatusMessage(statusId);
    
    int limit = response.RateLimiting.Limit;
    int remaining = response.RateLimiting.Remaining;
    
  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 25, 2015 @ 22:00
    Ismail Mayat
    0

    cool ill pull down tommorow and try it

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 26, 2015 @ 12:20
    Ismail Mayat
    0

    Anders,

    Brilliant this is working a treat, also notice you have added for instagram, i believe from docs for token you can have 5000 per hr so for now i will leave that as is.

    Regards

    Ismail

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies