An effective way using Disqus API - ios

Background info:
iOS app on iOS 7.0+
Moqod iOS library ( https://github.com/moqod/disqus-ios )
App would load comment for any time user view the wordpress post detail.
Case Description :
This question is mainly raised by the 1000 requests limit per hour from Disqus API. For my app, I load the comments when user views a post detail. If 1000 is the limit, it will be reached if there are more than 1000 people view post detail within a hour. I believe it is really easy to reach. Try to think about if there is 1 000 000 users are using my app. if 1% of the pool view posts within an hour. It will be broken.
I haven't count it takes extra call to obtain the thread ID which used on posting message and the number of posting comment.
Question :
How do people usually design an iOS app would satisfy the above case ??
Or Do I have an incorrect approach of using the Disqus API ??
Please kindly help.
Thanks

Related

Difference between Twitter's user and application rate limits

The Twitter's API documentation is quite confusing for me.
It says that rate limits for statuses/update are 300* per user; 300* per app
Does it mean that each of the users can do 300 tweets/retweets? Or it means that all users can do 300 tweets/retweets together per time window?
Thank you for attention!
This announcement may help to clarify the information. At an overall application level, it is not possible to post more than 300 Tweets and/or Retweets inside that window, regardless of the number of users, unless you've applied for elevated access to the API.

Add a larger number of block users via one Twitter Api request

I just learn about Twitter for couple of days. I 'm facing a problems in building an app that add a large number of users to block list via Twitter Api (POST blocks/list ). But this Api is only work with one user per request, using it will lead to 'API RATE LIMIT'. That I want here is a method that can add a lot of users to the block list via one request Can anyone help me overcome this problem ? Thank and best regards. Like this site http://blocktogether.org/
You're getting two things confused.
There is GET blocks/list which allows you to receive a list of a blocked users.
On the other hand POST blocks/create allows you to block users from your twitter account. I believe that's the one you're wanting.
Either way they're both rate limited and you'll need to send multiple requests to the twitter API in order to reach whatever number you're looking into adding. As of now, until twitter decides to change it, it's only 1 user at a time.

twitter api 1.1 url count alternative

I've been using the old url api(v1) to get the count of a given url, lately I needed to get also the re-tweets and started searching about that.
this is the exact url I'm using right now:
http://urls.api.twitter.com/1/urls/count.json?url=http://google.com
As I viewed with some reading the v1 api is deprecated but at least it's still working.
I found some questions on the dev page of twitter:
https://dev.twitter.com/discussions/12643
those are a little old questions and have no specific solving to the problem. I mean, the most near solution was using the search api(search/tweets) which could be good but not a exactly replacement for the urls/count method.
Please note that Twitter's search service and, by extension, the
Search API is not meant to be an exhaustive source of Tweets. Not all
Tweets will be indexed or made available via the search interface.
also it has a limit for 100 results at maximum per 'page', even it throws the link to get the next set of objects, thats good but when the search reaches 1 million of results I'll need to get page over page to now how much tweets I got and having to do to much request to the api...
I sought some question over the dev page on twitter suggested using the stream api, I've tried using (statuses/filter) but that don't work very well given a URL as track param(which they said that is the keyword to track).
So, anyone who's been using the old urls/count has found a reliable alternative with the new apiv1.1, especiffically to get the tweets and re-tweets for a given url ?
The official suggestion by Twitter staff is that either the search/tweets endpoint (having just the last 7 days data) or the Streaming API be used (handling yourself the counters, making everything just too complicated for a d*mn counter).
As an extra warning, the old endpoint (http://urls.api.twitter.com/1/urls/count.json?url=YOUR_URL) will stop working on November 20th, and according to this blog post from Twitter there are no plans to replace it with anything in the short term and they are even removing the count from their own buttons.

Can a twitter-application be blocked?

For 4 weeks, everything has been working smoothly - then all of a sudden none of the users of my application has been able to follow people. I quickly created a new application and tried with a couple of the same users, and it worked. My question then becomes, can an application be rate limited? Every other function (favorite, unfollow, direct messaging) works like a charm. The error it returns for every user is
tweepy.error.TweepError: [{'message': "You are unable to follow more people at this time. Learn more <a href='http://support.twitter.com/articles/66885-i-can-t-follow-people-follow-limits'>here</a>.", 'code': 161}]
Thanks.
Because you've exceeded their follow limits? From their support page:
If you're unable to follow more accounts, you've probably hit a follow
limit. Twitter has imposed reasonable limits to help prevent system
strain and to limit abuse.
Your application needs to stop abusing their limits. It doesn't look like support can help. Do read this page and try to conform to the rules.

Twitter Profile Image API deprecated

I am using Twitter API version 1 and replacing them to v1.1.
Then I cannot find users/profile_image/:screen_name API on version 1.1.
https://api.twitter.com/1/users/profile_image/shonanshachu
Does anyone know which API can be the best practice for replacing users/profile_image?
What I want is list of profile images or simple url with parameter of Twitter ID or screen name.
Maybe this will be useful for you. Those calls return all the info you need, including the image link. If you need only one user's image for a given user_id or user_screen, then you can read more from here:
https://dev.twitter.com/docs/user-profile-images-and-banners
https://api.twitter.com/1.1/followers/list.json (you can replace followers with friends)
I haven't found a great solution to this yet. The closest thing I have found is the twitter API 1.1 docs for users/show, but that is an authenticated call (requiring a user context) which is rate-limited (180 requests per 15 minutes). They mention this about getting the profile image url on the page about uploading a new photo:
You can either update your local cache the next time you request the
user's information, or, at least 5 seconds after uploading the image,
ask for the updated URL using GET users/show.
I imagine once the 1.0 API is shut off in March 2013, this question will get a lot of votes. :)
There are some hints that twitter is adding methods to their API to aid in retrieving images. We'll have to wait and see.

Resources