I'm developing a package that ties the Facebook SDK into Laravel. (Soon to be shared with you guys!)
I have a base class to interface with the SDK and a number of separate classes for working with other Facebook objects. Basically extending the functionality of the SDK Facebook provides.
I have a User class for handling permissions/tracking/anything related to the authenticated Facebook user. And I have a PageTab class for working within the context of a page tab. And I'll be adding more of these later.
So my question is, should I use multiple facades to interface with these separate classes? Like
FacebookPageTab::pageIsLiked();
FacebookUser::isLoggedIn();
Or should I just have a "Facebook" facade that does it all? I'm kind of new to Laravel so I'm trying to figure out how to implement a do-it-all facade. Maybe pointing the "Facebook" facade to an "Environment" class or something that lazy-loads the appropriate services? Not sure the best practice on that.
And this has been my first official post on .io! Yay! :) Thanks!
I think a single Facade would be much tidier to be honest
Yeah, I think that's kind of the direction I'm going. Thanks! :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community