'Class 'Facebook\Facebook' not found" Facebook SDK error

后端 未结 3 1063
孤独总比滥情好
孤独总比滥情好 2020-12-11 01:25

Well I am new to facebook sdk. I have being following the guideline and performing the steps as written.. but I am getting this error and I dont know why?

          


        
3条回答
  •  温柔的废话
    2020-12-11 02:21

    Download the zip file from here : https://github.com/facebook/php-graph-sdk/archive/5.4.zip

    Steps :

    1. Unzip the content (by either just double clicking on the zipped file or use any available unzipping software to unzip or decompress the downloaded file)

    2. Navigate to the "src" folder.

    3. Copy or cut the "src" folder and paste right within the folder from which you have your php files.

    4. make sure you have created "includes.php" file within your php project workspace ie. the folder in which your web page is sitting. And add this line to your "includes.php" file :

      require_once 'src/Facebook/autoload.php';

    5. Now in your php file(s) that has to do with facebook you can then add :

      require_once("includes.php");

    6. Now save your file and go into your browser and refresh.

    //Do remember to keep your work organised by now referencing all files that may be needed in your project via "includes.php". This may vary for some developers, depending on how and what you are working on.

提交回复
热议问题