Skip to content

Twitter Digest Lives!

Despite Twitter’s best efforts, I’ve managed to bring back Twitter Digest from the bring of destruction to work with the new Twitter API (v1.1). Version 2.8 of the plugin has just been released and should be considered unstable until I’ve had a chance to test it over the a few days. However, considering 2.7 was not working for anyone, we’d be no further behind if a bug in 2.8 prevented tweet digests from being created. Feel free to try it out yourself and let me know if you run into problems.

Unfortunately, Twitter now requires authentication for all API requests. I won’t get into why this is stupid here, but suffice to say the Four Tokens of the Apocalypse are upon us and we’re all worse off for it. You can check out this post to see how you can get your own tokens and, if interested, how I ended up fixing the plugin. Basic instructions are:

  1. Login in to http://dev.twitter.com/apps
  2. Create a new Twitter app and generate tokens.
  3. Enter the token values in the corresponding fields on the Twitter Digest option page

Finally, I’m no expert on Twitter authentication or oAuth, but it seems you only need one set of tokens if you are running multiple website with digesting multiple Twitter feeds, as long as the tokens you use on the plugin are associated with a Twitter account that has access to the Twitter account you want to digest. For example, if you create the authentication tokens for @a and @a follows @b, then based on my cursory testing, it appears you don’t need a Twitter App or authentication tokens associated with @b to digest @b. Just put ‘b’ in ‘Username’ option field on the Twitter Digest option page and it should work. Like I said though, @a has to be following @b.

Let me know if anything fails and thanks for the feedback.

20 Comments

  1. wrote:

    There seems to be some issue with the maximum number of tweets returned from the Twitter API. Despite Twitter indicating here that the limit is 3200, my timeline is only returning the last 200 even though I said 3200 in the request url. If anyone regularly publishes over 200 tweets per digest, I’ll look into this soon, but if not, it may be shelved until I have more time.

    Sunday, June 23, 2013 at 3:16 pm | Permalink
  2. wrote:

    Thanks for fixing it. The new info appears to be the exact same info that can be copied from the same fields in twitter tools. I copied the info and it worked.

    Sunday, June 23, 2013 at 6:08 pm | Permalink
  3. wrote:

    I’m still getting the API error after updating & configuring API keys.

    Error retrieving tweets. Make sure your username and password are correct.
    Status: 410
    {“errors”: [{“message”: “The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.”, “code”: 68}]}

    Monday, June 24, 2013 at 1:08 am | Permalink
  4. wrote:

    Thanks a lot for your efforts! Unfortunately I have the same problem as JAB_AU and the exact same error message.

    Monday, June 24, 2013 at 1:02 pm | Permalink
  5. wrote:

    That is weird. The “Make sure your username and password are correct” message is from the last version and I took it out in the latest, so are I’m not convinced the upgrade worked correctly. On the other hand if they API authentication token fields are visible on the TD options page, then that is the new version. Maybe double check and make sure it says you are running 2.8 on your plugin page. Other than that, I can’t think what could be wrong.

    Monday, June 24, 2013 at 1:08 pm | Permalink
  6. wrote:

    Hi, I also had the same problem as Jab_Au and Jan. What helped for me was to completely remove the plugin and then install it again. It works just fine now, thanks a lot!!

    Tuesday, June 25, 2013 at 1:09 am | Permalink
  7. wrote:

    Deinstalling and reinstalling the plugin didn’t work for me… It says 2.8 on the plugin page, I see the new fields for the tokens but the error message stays the same. I’ll send you two screenshots, Tim. Maybe you’ll discover something. I would give you admin access to my blog, too, if that helps. It’s a WordPress Multi-User (= multi blog) installation. Maybe that’s a problem?

    Tuesday, June 25, 2013 at 9:51 am | Permalink
  8. wrote:

    I tried reinstalling, no joy.

    Wednesday, June 26, 2013 at 1:30 am | Permalink
  9. wrote:

    Are you running the weekly or the daily digest? If the weekly, then that error may not go away until the plugin produces a digest or another error. I haven’t tested the weekly digest functionality with the new plugin, but it should be no different. Try clicking on the “Ping Twitter” button at the bottom of the options page. If you are on a weekly schedule, you should get a notice of something like “Today is Tuesday and the local time is 16:56:14 and you are configured to publish on Thursday at 19:00.” If you get that, then everything should be fine and you just have to wait until the scheduled time to confirm that the digest is published.

    If you’re not running on the weekly schedule, then I’m still confused. Try clicking the “Ping Twitter” button anyway and see what message shows up next to the buttom.

    Thanks
    Tim

    Wednesday, June 26, 2013 at 9:49 am | Permalink
  10. wrote:

    I upgraded a few hours ago and my first digest went out no problems. Working great, thanks!

    Only suggestion, on the screen where you ask for the various keys/secrets, include a link to the page on Twitter’s site where you find that information and set everything up, along with maybe a sentence or two of instructions.

    Anyway, thank you very much for this plugin, and for fixing it after the latest changes!

    Friday, June 28, 2013 at 6:47 pm | Permalink
  11. wrote:

    Thanks for your feedback. There are a few tweaks I’ll be making in the next week or so and I’ll add the link to Twitter’s App creation site to my list of things to add.

    Friday, June 28, 2013 at 7:30 pm | Permalink
  12. wrote:

    My weekly post came around & error message has disappeared & the post was successful.

    The has tag search links need to be updated also

    Old: http://search.twitter.com/search?q=%23fail
    New: http://twitter.com/search?q=%23WestVillage

    Friday, June 28, 2013 at 7:33 pm | Permalink
  13. wrote:

    JAB_AU – Thanks for the heads up on the hash tag links. I’ll update those soon.

    Tim

    Friday, July 12, 2013 at 7:11 pm | Permalink
  14. wrote:

    One other comment, in my digest for July 1st, everything got truncated after a tweet I quoted that used emoji. In other words, the digest was fine up to the tweet that used emoji, and within that tweet up until the emoji, but then the post ended, with no tweets posted after that point.

    (I then edited the post to manually recreate the rest of the digest.)

    The tweet in question was: https://twitter.com/abulsme/status/351497883905826816

    Tuesday, July 2, 2013 at 10:30 am | Permalink
  15. wrote:

    It also posted duplicates both for today’s update and yesterday’s (the one with the emoji). Just an FYI in case there is something to be fixed. (Otherwise, I’ll just delete the dups and be happy to have a digest again. 🙂 )

    Tuesday, July 2, 2013 at 6:12 pm | Permalink
  16. wrote:

    Sorry for the delayed response. I’ve been away on vacation. I’ll have to look at adding emoji support. Doesn’t surprise me that the plugin barfed on that. If you have access to your web server logs there is possibly a PHP error in there that would be useful.

    Thanks
    Tim

    Friday, July 12, 2013 at 7:09 pm | Permalink
  17. wrote:

    First off thanks for this plugin. It’s great…

    Secondly, it’s not working for me. I have upgraded to 2.8, create twitter app, have the tokens etc but when I click the “Ping Twitter” button I just get a big white page 🙁

    Some bodgy/hacking (by adding update_option(‘ws_td_error’, ‘xxxx’); lines) seems to indicate that the problem is with this line:

    $tweets = $connection->get($url);

    Which never returns 🙁

    Any ideas or suggestions?

    Wednesday, July 31, 2013 at 6:09 pm | Permalink
  18. wrote:

    d’oh found the problem. I didn’t have curl module installed for php.

    Found this by adding:

    error_reporting(E_ALL | E_STRICT);
    ini_set(‘display_errors’, 1);

    at the top of the twitter-digest.php

    Wednesday, July 31, 2013 at 7:18 pm | Permalink
  19. wrote:

    Hi Tim,

    Awesome plugin! loving it!,

    But just an issue which is similar to JAB_AU (Comment number 3).

    But now, when I click Ping Twitter, it gave me this error:
    Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1 in /home/notakoson/domains/blogkimi.com/public_html/wp-content/plugins/twitter-digest/OAuth.php on line 120

    Please advise.

    Wednesday, August 28, 2013 at 8:32 am | Permalink
  20. wrote:

    Not really sure on this one. Have you tried re-installing the plugin? Also might you have another plugin that uses the OAuth.php code? Something else that accesses Twitter perhaps?

    Tuesday, October 1, 2013 at 8:03 am | Permalink