Nov 12, 2009

Blogger API Limitations :(




Well folks, it deeply saddens me to announce that the blog and comment counter I spent so much time and brain power on is not going to remain useful very much longer! :( Apparently the Blogger API has a limit of 200 entries, and that's why the comments are being counted incorrectly already. Our class has a total of 130 blog posts so far, and if that surpasses 200, the count will begin to be incorrect as the comments counting is. I wish there was something I could do, but I guess we'll all have to resort to counting everything by hand from now on (or using Colin's way). I have contacted the developers of the API, but since it's through Google, who knows if they'll ever even respond...especially before our semester is over.

Sorry for the false hope in this application, but I don't see any way around this 200 entry limitation that Blogger has on their API. The most annoying part of it all is that the limit is not stated in the documentation anywhere! I spent countless hours trying to debug my JavaScript, assuming I had made a programmatical error along the way while counting the comments, but after a while I realized it wasn't my code. I began searching the Web to see if there was any sort of limitation and sure enough, 200 is the maximum!

If anyone can think of any neat ways to hack the thing or pull the information back differently from the API, I'd be more than happy to experiment with it some more, but I just don't think there's much of a way around it. I'm going to look into the different querying options they offer to see if I can query to different time frames or something than do the math once the two different results come back. Even so, that would still be a limit of 400, meaning the comments still would be incorrect.

If something ends up changing I'll be sure to post back with the results, but in the meantime I'm afraid we've reached the end....I guess it's like they say....All good things must come to end. LOL

Here's the link again for those who still want to use it to count the posts, but remember that once we surpass 200 posts as a class, that count will be off as well.

http://people.emich.edu/mmager/449


UPDATE:

I fixed it everybody!! The code to make this work is now a complete mess, but I basically had to make 8 different AJAX calls to the blogger API dividing it up in the query on a two week basis rather than getting it all at once. This allowed me to count the comments for each two weeks then add them all together in the end to get the total. You guys will notice your numbers are much higher and actually accurate now!

11 comments:

  1. Thanks Matt, I am glad you fixed it. Reading your post I was going to suggest breaking it up by timeframe but you beat me to it. Thanks for all of your hard work in completing this mini project.

    ReplyDelete
  2. Matt, This is one of the most useful applications that has come out of this class. I am really glad you took the Initiative to do this. I was trying to post a blog then do 3 comments before the next blog was due but I kind of lost track of my coments because I just don't know what to blog about any more. Thanks.

    ReplyDelete
  3. Matt, thank you! This is a great tool and reminds me that I have to post some more ;)
    Breaking the request into several to get all needed data is a good way to bypass the APIs limitations. Great idea!

    ReplyDelete
  4. Matt, thank you for your hard work and dedication to this endeaver. It is definately very hopeful to us in the class. Good job!

    ReplyDelete
  5. Matt, all your persistence has finally paid off...this is such a helpful tool for our class to use to keep track of all the blogging that we need to do. I really appreciate the time that you spent on fixing this problem....great job!

    ReplyDelete
  6. Matt,

    Thank you for the persistence in making this tool work. It's extremely helpful and may save us from having to write up a few extra blogs to be sure we've done them all. Way to go on finding a work around to the limitation. This kind of problem solving is invaluable.

    ReplyDelete
  7. Matt,

    Thanks for fixing the bugs on your site! I just looked up my blog and comment count and it seems to be accurate. I wish it wasn't though cause I have about 40 more comments to post! Ok 39 more ;-). Keep up the good work!

    Colin

    ReplyDelete
  8. Matt, you are the man. Good job! thank God it worked before I went up to talk to Drake because that would have been embarrassing. Now I have the right amount of comments :) Thanks again

    ReplyDelete
  9. Thank you for working on this so hard. I had some worries about the earlier version of your program, because it was definatelly giving me a count of comments that was definatelly not right. But now I can say it is much better I have 14 more comments with 4 more blogs. I will try to get the comments away because the professor has not graded them yet, meaning I will need some insurance against bad commenting from my side. Also as a hint the professor mentioned that if we have extra blogs or comments he will take the best once and will replace the not so successfull blogs, which is pretty cool.

    ReplyDelete
  10. Thanks Matt,
    When I started ready your post I didn't realize you were going to come up with a solution. I am glad that you did, but even if you didn't it was such a great application. I think everyone is thankful for you creating this for us!

    ReplyDelete
  11. Outstanding job! I really appreciate this tool and use it to see where I stand in terms of the number of blogs. I think the entire class will love you for this! Keep up the great work!

    ReplyDelete