2

I'm developing a web app with zend framework and i'd like to discuss what is the best way to intergrate all the JS and FBML in a ZF project, anyone have some experience. For example, which may be a good solution for have the Facebook istante in every controllers, a front controller plugin?

4 Answers 4

2

For all those still landing on this POST: There is a Facebook PHP SDK on github, offered by facebook now. It is quite helpfull and has a good documentation and examples. The other Projects listed above are mostly stopped or in alpha status.

2
  • When I asked this question the facebook SDK already existed. My question was specific about Zend Framework and facebook stuff May 16, 2011 at 16:03
  • @Luca Bernardi: You can just put the mentioned SDK in you Zend Library Folder and use it pretty much like if it was a Zend Component actually if you do what Gordon wrote as well. Using it will still save you a lot of time. Jun 30, 2011 at 13:06
1

Since JS and FBML is part of the presentation layer, these would have to go into ViewHelpers. Fetching data from FB via their APIs would go into a service, like Zend_Service_Facebook. There is a proposal for both components in Ready for Review state for some time now:

2
  • 3
    Oh man, Zend_Service_Facebook on GoogleCode is sooo started :D (=empty repository) Mar 1, 2010 at 15:34
  • 3
    @tomas not my fault and also doesn't make the answer less valid in my opinion. The OP asked about architecture, not ready to use code. If you want ready to use code use pear.php.net/package/Services_Facebook
    – Gordon
    Mar 1, 2010 at 15:45
1

There's a Zend Framework Library that you can use to access all Facebook Methods at GitHub from your controllers and Models.

https://github.com/erickthered/Facebook-PHP-SDK-for-Zend-Framework

For the views, it's better to add the facebook JS file with the APPID and XFBML parameters to your layout/template so that you can use tags anywhere.

0

If you are using zend framework 2 you can use this tutorial...

http://kdecom.blogspot.co.nz/2012/10/how-to-login-using-facebook-in-zend.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.