Facebook status to iChat status script

Discussion in 'Mac Programming' started by interairproxima, Jan 12, 2011.

  1. interairproxima macrumors newbie

    Joined:
    Jul 10, 2007
    #1
    Hey guys,
    Sorry if this has already been discussed, I searched day and night for answers with no results. I remember a while back I discovered a script that would allow someone to post a Tweet and have it end up as their iChat status message through a crontab. I tried to find a similar script that would allow me to use my Facebook status message as my iChat status, but ran into several brick walls and have had no success finding such a script. What would it take to write something like this? Is it even possible?
    Thanks in advance!
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    I am sad to reward a bump, and even more so that this is Facebook related. Step 1 is having a reliable way to get this status. Facebook surely has APIs abound to allow one to grab this. This seems promising:
    http://developers.facebook.com/docs/reference/api/status/

    I couldn't immediately tell how you'd grab a status message, but that seems like a good place to start. Ultimately it would be best if you could use the curl commandline to pull the status message. From there you can use AppleScript to set the iChat status. You can set the "status message" to achieve what you want. You may need go stick the AppleScript in a temporary file, then use the command on this page to run it:
    http://docs.info.apple.com/article.html?path=AppleScript/2.1/en/as164.html

    So:
    Find URL to grab Facebook message.
    Transform this with something like awk into a short AppleScript
    Write AppleScript to file
    Execute AppleScript
    Delete AppleScript

    It seems like working out the right URL and access token business from Facebook will be the hardest part, but it must not be too hard.

    -Lee
     
  3. interairproxima thread starter macrumors newbie

    Joined:
    Jul 10, 2007
    #3
    I feel honored to know that my shameless bump has been rewarded.
    I'm pretty sure this is what I needed, but sadly my coding knowledge is very limited, so I'm not sure if I can use it. All i've ever coded is a script that opens 4 apps at once -_-.
    I was kinda hoping that I could just reuse the old code from the script I downloaded and plug in the FB url in the stead of the twitter URL, but that doesn't look like its gonna work.
    If anyone could donate their time for this cause, that would be great :D.
    Thanks again.
     

Share This Page