1
votes

As a test I am trying to create the simplest webpage where I can type a short post and have it simultaneously update my twitter account status and my facebook status. I also want to be able to read and display past statuses on this page as well. So basically I am trying to code the simplest example that can push and pull with both twitter and facebook, and eventually not just status updates but all kinds of content from facebook as well. I've found some tutorials but they seem to be involving earlier iterations of the frameworks, I obviously would like to use the new facebook open graph api and the newer twitter with oAuth.

My background is in Coldfusion, but it seems (especially with facebook open graph) that PHP might be required to set up what I want, is this true? Also, in order to do this do I have to set up both a facebook application and twitter application, and get the appID's etc?

I've been having a really hard time setting this up and I'm on a bit of a deadline, so if any of you could give me a clear breakdown on what steps I need to go through and sample code to draw off of that would be great.

EDIT::

What I'd really like to do as a test is to make a system that can pull the most recent few posts from all of my social networks. So I would create some kind of base architecture, and then "hook in" my social network accounts to be able to push and pull with my system. This sort of thing might require the ubiquity of PHP anyway, so if there is a good sample PHP project that has the basics of this I'd be interested in seeing that as well.

Thanks!

4

4 Answers

3
votes

This blog has a couple of examples of using the open graph API in ColdFusion. I tested one of the examples myself and it worked as advertised. The code could use some improvement in some cases (like the variables being repeated on each page) but he gets credit for being the only working implementation I have seen so far.

Basic open graph implementation http://blog.abusalah.info/2010/07/implementation-of-facebook-graph-api-in.html

He has a later post showing how to use this to post to your Facebook wall using the graph API (I'd post the URL but stack overflow isn't allowing me).

Someone started porting his work to an open source component you could reuse on your project which you can find at riaforge[dot]org - search for facebook.

3
votes

I have a co-worker who is currently working on Facebook integration via CF. I've written an application using oAuth via http://oauth.riaforge.org/.

As far as I can tell, there isn't a requirement that you use PHP. It's just a lot easier to find tutorials for PHP.

That said, there are any number of Twitter tutorials that I found while looking for documentation on CF and oAuth.

Googling for "coldfusion twitter oauth", I see that the 3rd link points to a page which includes two CF libraries on Twitter's website.

Googling for "coldfusion facebook", the first link points to FB's developer wiki. The first three are articles by Ray Camden on FB integration, the third being posted to Adobe's Developer Connection.

To make a long story short (too late!): No, you can use CF to connect to FB and Twitter just fine.

Added: A quick Google for "facebook open graph coldfusion" returned this. I didn't really scan past that. Google is your first, best line of defense. Stack Overflow is awesome when things aren't easily found there.

1
votes

Twitter is definitely not a problem, as oAuth has nothing to do with what middleware you're using for everything. I've written components that interact with Twitter's API using oAuth. It is a matter of reading the specification and knowing how it all works. My personal experiences came with a lot of trial and error before getting there, but once I got there, first, it felt like such a great accomplishment, but secondly, I had a great working model for working with oAuth that not only works with Twitter, but many other API's that require oAuth authentication.

As far as Facebook is concerned, creating applications using ColdFusion can be a little bit of a challenge, partly because you won't really find many people doing Facebook apps using ColdFusion, and support is going to be very sparse at best. Ray Camden has written a very nice article about simple CF integration with Facebook located at http://www.adobe.com/devnet/coldfusion/articles/coldfusion_facebook.html. As far as official API support or libraries coming from Facebook, you can just about forget it. They originally did support PHP and Java, but have since dropped Java support.

Good luck in your efforts!

1
votes

There's no requirement you use a particular programming language or platform. Have you looked at RIAForge?

If there's no off the shelf ColdFusion client, you could do the legwork and develop one yourself. But then again, ColdFusion is Java based, so you just leverage one of the java packages that supports the Open Graph API.

Likewise for twitter, if none of the existing ColdFusion examples suit you, you could always use one of the other libraries.