GithubHelp home page GithubHelp logo

Comments (5)

paulbain avatar paulbain commented on April 25, 2024

Did you follow the developer guide?

Sounds like you probably aren't including the autoloader:

<?php
define('VENDOR_DIR', '/path/to/sdk/'); // Path to the Vendor directory 
$loader = include VENDOR_DIR.'/vendor/autoload.php';

See this guide:
https://github.com/facebook/facebook-php-ads-sdk/blob/master/DEVELOPER_GUIDE.md

StackOverflow is also a good place to ask these sorts of questions:
http://stackoverflow.com/questions/tagged/facebook-ads-api

from facebook-php-business-sdk.

Nathan-Srivi avatar Nathan-Srivi commented on April 25, 2024

Hi paulbain,

Thanks for your response

when i update this code
'<?php
define('VENDOR_DIR', '/path/to/sdk/'); // Path to the Vendor directory
$loader = include VENDOR_DIR.'/vendor/autoload.php';'

i got this following error,
Fatal error: Class 'Facebook\FacebookSession' not found in

So i include facebook sdk folder into example folder and i include files into my connectionobjects.php like this
require_once( 'Facebook/HttpClients/FacebookHttpable.php' );
require_once( 'Facebook/HttpClients/FacebookCurl.php' );
require_once( 'Facebook/HttpClients/FacebookCurlHttpClient.php' );
require_once( 'Facebook/Entities/AccessToken.php' );
require_once( 'Facebook/Entities/SignedRequest.php');

But now i got this following error,
Fatal error: Class 'FacebookAds\Api' not found

Please help me please

from facebook-php-business-sdk.

paulbain avatar paulbain commented on April 25, 2024

Did you update the path to the vendor directory where the section says '/path/to/sdk/'?

As this doesn't look like a specific issue with the SDK, I'm going to close this out, and recommend you ask programming questions on the stackoverflow:
http://stackoverflow.com/questions/tagged/facebook-ads-api

from facebook-php-business-sdk.

Nathan-Srivi avatar Nathan-Srivi commented on April 25, 2024

Hi paulbain,

Please look at my final edited comment. this is my last question. please help me

from facebook-php-business-sdk.

paulbain avatar paulbain commented on April 25, 2024

Did you install from composer or from github? You should use composer as it includes the correct version of the Facebook PHP SDK.
You should also use the autoloader in the vendor directory and not include the files yourself.

from facebook-php-business-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.