[FLOW3-general] Inject Facebook-API-Object
"Christian Müller (Kitsunet)"
christian.mueller at typo3.org
Thu Nov 10 09:38:59 CET 2011
On 10/11/11 09:23, Bernhard Marx wrote:
> Hi Christian,
>
> thanks for your quick reply.
>
> no problem, if I'm "successfull" I'll share...
>
> What I posted ist the originally code from Facebook to set up the API,
> in "plain PHP".
>
> How do I handle the "required_once". I had yesterday in the night the
> feeling that the file is not found...
>
> Greets
> Bernhard
Yes ok, so the Facebook class has require_once on "base_facebook.php",
so they must be in the same directory.
If you take a look at the TYPO3.SwiftMailer package you can see an
example. It wraps the SwiftMailer script, which resides in
Resources/Private/PHP/SwiftMailer. It is included in Classes/Package.php
and then the other Package classes extend from the SwiftMailer classes.
I would do it similar with facebook.
Facebook
Classes
Package.php <- contains boot method where you include facebook.php
API.php <- could be the wrapper class => new \Facebook\API()
Configuration
Settings.yaml
Meta
Package.xml
Resources
Private
PHP
Facebook
facebook.php
facebook_base.php
More information about the FLOW3-general
mailing list