Using Twitter oAuth with Drupal

Steps to Get Twitter.module working with Rules:

Required Modules:

Take the following steps:

  1. Install a few modules: To start with, install the following modules:

    • oAuth
    • Twitter
    • Twitter Post
    • For using Rules (optional)
      • Twitter actions
      • Token
      • Rules
      • Rules Administration UI
  2. OAuth settings: Visit the oAuth setting page (admin/settings/oauth) and under OAuth cryptography select “RSA-SHA1” and click “Save configuration”.

  3. Register with Twitter: On the Twitter settings page (admin/settings/twitter) you now need to register your application with Twitter (https://twitter.com/apps/new).

    • Application Name: a simple name to identify what you are doing.
    • Description: Minimum of 10 characters is required.
    • Application website: The URL of the website your are registering.
    • Organization: Your organization name.
    • Website: Your homepage URL.
    • Application Type: Browser
    • Callback URL: This is provided by the Twitter module (admin/settings/twitter) http://{your_url}/twitter/oauth
    • Default Access type: Read & Write
  4. Secrets: Once the application has been registered, Twitter will provide you with the Consumer key and Consumer secret. Enter those on the Twitter module settings page back on your site (admin/settings/twitter) and click “Save configuration”.

  5. Post to Twitter (Optional): If you wanting an option to post to Twitter when you add new content to your site, click the “Post” tab and select the node types you want it to show on as well as set the default format of the post.

  6. Setup your account: This next step is critical. Edit your account page and select the sub-tab of “Twitter accounts” (user//edit/twitter) and click “Add account”. This will take you to the Twitter.com page to authorize and allow access to your account.

    • If you want to use the “Post to Twitter” form at the bottom of the new node’s you can make this account global to the site by clicking “make global”. This will not effect the rules module.
  7. Time to add a rule (Optional: Rules integration): Go to the “Add a new rule” page (admin/rules/trigger/add), set the name, and set the Event for “After saving new content”. On the next page, add and action of “Post a message to Twitter”. On the setting page, enter the Twitter account name that you authorized in step 6. Enter the message that you want to tweet. If you installed the Token module you will be able to add tokens like “Node Title”.

  8. Watch it work! Now all you need to do is create a new node and it will post a message to the Twitter account you specified.

Is this what Flash on the mobile is all about?!?

There has been a lot of talk recently about Flash on mobile devices, specifically how bad Apple is for not allowing Adobe to develop a Flash player for iOS devices. So Adobe valiently turned the other way and said they would work with Google to develop Flash for Android. There has been much touting of the fact that Android 2.2 now supports Flash 10.1 (via a download from the Android Marketplace). 

This morning GigaOM’s NewTeeVee site has an aricle and video of the fancy new technology at work. What was their opinion?

“Shockingly bad.”

Hit the NewTeeVee site to view Kevin Tofel demonstration, over WiFi and a 25-Mbps Verizon FiOS broadband connection, and judge for yourself.

In Adobe’s defense (yes, I will come to their aid), these videos are not designed specifically for mobile devices.

However, that only underscores the face that it is a DREAM to believe that your content can be viewable on a mobile device without you having to do anything to optimize it. Mobile Flash is not a panacea.

Searching your Drupal site for Content by Author

Recently at work the issue came up that people were searching our site for all the posts by an author but it only returning the author’s biography node. After some digging, I finally found a simple solution thanks to Julia at juliakm.com.

The solution was simple and worked exactly as I was hoping it would. All you have to do is add the following code to your custom module (You don’t have a custom site module?).

 

//Adding author name to the search index
function custom_helper_nodeapi($node, $op, $arg = 0) {
   switch ($op) {
     case 'update index':
       if ($node->uid) {
          $user = user_load(array('uid' => $node->uid));
          return $user->name;
       }
    }

  }

Hopefully you find this helpful. The only drawback to this method is that you will have to trigger a reindex of all the content on the site.

Tiny Desk Concerts: Edmar Castaneda

For those of you who haven’t yet discovered the Tiny Desk concerts from NPR Music you truly are missing out. (You can even get a video podcast!) Each one features an artist recorded live at the desk of the host of NPR Music (the desk is small for some of the groups).

The most recent recording is of Edmar Castaneda, a Colombian who plays a traditional harp in modern ways.

This is harp playing like you’ve never heard before!

Enjoy!

Biblical Timelines

Ever sit down to read the Bible and can’t remember if Noah was still alive when Abramham was born (no, he died just before) or how long before Joash Jehoshaphat reigned? Then you might want to take a look at this site. SinceAdam is a personal project of a couple of Flash designers and is a fun tool to scroll around in and refresh your Bible knowledge. It even has the ability to link to in in your blog!

 

 

 

 

What do you worship?

If you have been a Christian for any lenght of time, I’m sure that you have read the second commandment:

You shall have no other gods before me. Exodus 20:3

Oh, you say, that’s an easy one to keep. There is no shrine in the corner of my house. I don’t have an alter in the backyard. But really? Are you sure?

I recently can across an interview with Mark Driscoll, Pastor of the Mars Hill Church in Seattle. He was talking with Terry Moran, co-anchor on Nightline about modern day idolatry. When asked what idolatry is, Driscoll answers “[a]n idol is someone or something that occupies the place of God in your life.”

Watch it for yourself:

 

What do you think? Do you have anything that you put above God?