On Thu, Oct 15, 2009 at 12:25 PM, Gunnar Strand <[email protected]>wrote:
> Hi, > > I am trying to write a Facebook canvas application in Catalyst using the > WWW::Facebook::API plugin and I am tearing my hair trying to get it to work. > > I have no problems with access to my canvas application from Facebook, but > I am unable to use any of the $c->facebook interface methods to acquire user > data, eg. friend list, event information etc. > > I would be very grateful if anyone could post an example of, for instance, > getting the currently logged in user's friends, or event information or any > information at all via the $c->facebook interface. All I get is error when > using the methods in the interface and the problem is definitely on this > side of the keyboard. > > KR, > Gunnar > Hi Gunnar, I've been meaning to write a blog entry on this, since there are some points to be aware of. I've built my own model that creates a per-context instance and works quite well. It isn't on CPAN (yet) but I should probably release it. I would advise against using the Plugin, as it's not modifying the application behavior or dispatching so having it as a plugin is a bad fit. I posted my code in a gist: http://gist.github.com/211218 Keep in mind that you can't do differentiation on request type like GET/POST through the canvas. Make sure that you have the application added to your profile (check the app added, there is a chain mid-point to do this in the gist). Hope this helps, -J -- J. Shirley :: [email protected] :: Killing two stones with one bird. http://our.coldhardcode.com/jshirley/
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
