Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Facebook Graph Sdk Laravel Package

martin1982/facebook-graph-sdk

PHP 7.4+ Facebook Graph SDK (v7) for accessing the Facebook Platform. Install via Composer, initialize with app ID/secret, and make Graph API requests with built-in helpers for login flows and access tokens. Includes docs and PHPUnit tests.

View on GitHub
Deep Wiki
Context7

FacebookResponseException for the Facebook SDK for PHP

Represents an error response from the Graph API.

Facebook\Exception\ResponseException

Whenever a FacebookResponseException is thrown, you can access it's previous exception with the getPrevious() method to get more information on the specific type of error response that the Graph API returned.

try {
  // Some request to the Graph API
} catch (Facebook\Exception\ResponseException $e) {
  echo 'Message: ' . $e->getMessage();
  $previousException = $e->getPrevious();
  // Do some further processing on $previousException
  exit;
}
Class name Description
Facebook\Exception\AuthenticationException Thrown when Graph returns an authentication error.
Facebook\Exception\AuthorizationException Thrown when Graph returns a user permissions error.
Facebook\Exception\ClientException Thrown when Graph returns a duplicate post error.
Facebook\Exception\OtherException Thrown when Graph returns an error that is unknown to the SDK.
Facebook\Exception\ServerException Thrown when Graph returns a server error.
Facebook\Exception\ThrottleException Thrown when Graph returns a throttle error.

These exceptions are derived from the error responses from the Graph API.

Instance Methods

FacebookResponseException extends from the base \Exception class, so getCode() and getMessage() are available by default.

getHttpStatusCode

getHttpStatusCode()
Returns the HTTP status code returned with this exception.

getSubErrorCode

getSubErrorCode()
Returns the numeric sub-error code returned from the Graph API.

getErrorType

getErrorType()
Returns the type of error as a string.

getResponseData

getResponseData() Returns the decoded response body used to create the exception as an array.

getRawResponse

getRawResponse()
Returns the raw response body used to create the exception as a string.

getResponse

getResponse() Returns the FacebookResponse entity which represents the HTTP response.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony