Friday, December 24, 2010

Checking-In at GetGlue with MythTV



GetGlue is a leading social network for entertainment. Fans use GetGlue apps to check-in while consuming entertainment to share with friends. I wrote a Python script that enables MythTV to automatically check-in to GetGlue with the recording you are watching.

GetGlue provides an application programming interface (API) that uses OAuth for authorization.

NOTE/RANT: I don't think I'm supposed to share my oAuth developer keys. I don't know how the architects of oAuth expected us to deliver scripts. I guess they assume everything would be web based. Until someone tells me different I'm not going to release my oAuth keys. So, I guess you'll need to apply for developer keys and plug them in to my python script.
To obtain a GetGlue developer key, please e-mail api@getglue.com with your name, company name, app name, and OAuth callback (not needed for this), as well as a short description of the application.

Below are the high level steps to get this working and its accompanying video tutorial. These steps were performed on an Ubuntu 10.04 MythTV frontend PC.



  • Download my python script.
  • Apply and receive developer keys from emailing a request to api@getglue.com. See rant above.
  • Copy and paste your oAuth developer keys in my script variables CONSUMER_KEY and CONSUMER_SECRET.
  • Install Python Setup tools - sudo apt-get install python-setuptools
  • Download and install OAuth library. - sudo python setup.py
  • Authorize the app one time in a terminal - python MythTVGetGlueCheckin4.py testtest
  • Copy the OAuth token file in to the mythtv user's directory.  sudo cp ~/.MythTVGetGlueCheckin /home/mythtv/.
  • Change owner to mythtv user. sudo chown mythtv /home/mythtv/.MythTVGetGlueCheckin
  • Change group to mythtv user. sudo chgrp mythtv /home/mythtv/.MythTVGetGlueCheckin
  • Set MythTV system event - Playback started
  • Watch some TV recordings and MythTV will automatically check-in to GetGlue. See my GetGlue profile for an example.





    http://www.youtube.com/watch?v=z_vWfWa7Ls0
  • Post a Comment