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.

CommentFileSizeAuthor
#1 twitter_backlog.patch5.76 KBsteinmb
twitter_backlog.zip1.94 KBmatt v.

Comments

steinmb’s picture

Version: 6.x-3.0-beta4 » 6.x-3.x-dev
Status: Needs review » Needs work
StatusFileSize
new5.76 KB

I 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:

Twitter returned an error: This method requires authentication.
0 status messages fetched.
dddave’s picture

Version: 6.x-3.x-dev » 6.x-5.x-dev
matt v.’s picture

Issue summary: View changes
Status: Needs work » Fixed

I decided to make a project out of an updated and cleaned up version of the code. See the Twitter Backlog module page.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.