For a site I've been working on, I needed to be able to retrieve the full Twitter backlog for a user, rather than just the 20 most recent posts. That is, I wanted to retrieve all 3,200 statuses made available via GET statuses/user_timeline.
I looked through the issue queue and documentation and wasn't able to find an existing method for getting the backlog, so I wrote a sub-module called Twitter Backlog, which I'm attaching. The module adds an "import backlog" link to the table on the Twitter Accounts form. Clicking that link begins a batch API process that retrieves the status backlog and then returns the user to the Twitter Accounts page with a message displaying the number of statuses retrieved.
I'm open to posting this as a separate module, if that would be better. I thought I'd start here though, to see if anyone has feedback on the idea.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | twitter_backlog.patch | 5.76 KB | steinmb |
| twitter_backlog.zip | 1.94 KB | matt v. |
Comments
Comment #1
steinmb commentedI personally like the idea of this being possible. Rolled this code against the latest dev.
Bugs:
There something wrong with hook_menu(). No menu entry found in my user account. If I type the menu path user/1/edit/twitter/backlog/100 batch import starts but fail with:
Comment #2
dddave commentedComment #3
matt v. commentedI decided to make a project out of an updated and cleaned up version of the code. See the Twitter Backlog module page.