Like many others, I'm having the following error while using the default facebook.php file: < Pre> Fatal Error: Class federation can not be reclassed in class 160: 160: / wamp \ www \ symfony \ src \ acme \ mainbundle \ controller \ facebook.php
The end of the class declaration in Facebook.php
Here is my code: need_once ("Facebook.php"); $ Config = array (); $ Config ['appId'] = '479914672022732'; $ Config ['appId'] = 'd451285c1c38126710980d2b7f2b43b4'; // Everything works fine so far This causes the error $ Facebook = new Facebook ($ config); How can I fix this error?
Whatever I have tried:
It has been ensured that there are no other functional classes in the project
changing need_once, include_once, etc. .
If a statement is not required to use a file or to make a Facebook verb, then it already exists
need_once ("Facebook.php"); $ Config = array (); $ Config ['appId'] = '479914672022732'; $ Config ['appId'] = 'd451285c1c38126710980d2b7f2b43b4'; // Everything works fine so far This causes the error $ Facebook = new Facebook ($ config); How can I fix this error?
Whatever I have tried:
It has been ensured that there are no other functional classes in the project
changing need_once, include_once, etc. .
If a statement is not required to use a file or to make a Facebook verb, then it already exists
research:
As well as many other posts, but they were related to framework such as Dropl, Zend, WordPress, etc.
What I have learned:
A good way to use Facebook Fashion SDK is by using a composer to get it into the project. Then, when defining the Facebook verb variable, be sure to use backslash, so its:
$ facebook = new / facebook ($ config);
Why try this if a bundle does this for you?
Check:
No comments:
Post a Comment