webtechnick / CakePHP-Facebook-Plugin

CakePHP Facebook Plugin
http://facebook.webtechnick.com
445 stars 138 forks source link

adding FB.Event.subscribe in $Facebook->init() #138

Open amjo opened 11 years ago

amjo commented 11 years ago

hellow!... first off, awesome job in creating this amazing easy to use plugin! :) :+1:

Second, i would like to know how i can make it easy to add functions and/or even listeners like FB.Event.subscribe inside the $Facebook->init() loaded at the bottom of the page.

the thing is, i have two scenarios, 1) user has landed with his/her FB account, 2) without.

in scenario (1) i want the Fb.Event.subscribe to be embedded in the FB.init(), and in the second case, logically i wouldn't want to; therefore, my issue is, is there a practical way where i can easily modify the contents of the FB.init()?

I wouldn't want to hardcode inside the Plugin/Facebook/Veiw/Helpers/... there should be more practical ways, no?... you think i should duplicate the init() function and call accordingly? or shall i add a new parameter in the init() function with the appropriate options?

cheerz