Download the PHP package raaabdullah1/meta-graph-errors without Composer

On this page you can find all versions of the php package raaabdullah1/meta-graph-errors. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package meta-graph-errors

meta-graph-errors

Meta's Graph API, Instagram, Messenger and WhatsApp Cloud API return numeric error codes that are reused across products and often unhelpful. This library maps them to something your code can act on: what kind of failure it is, whether retrying can help, and what to do next.

Install

Requires PHP 8.1 or newer. No other dependencies.

Laravel example

What you get back

classify() and fromResponse() return a Classification:

Field Type Meaning
category ErrorCategory Authentication, ProviderPermission, RateLimit, Validation, PolicyViolation, ResourceState, Transient, Unknown
retryability Retryability Retryable, RetryableWithBackoff, RequiresUserAction, RequiresReconnect, RequiresProviderAction, NotRetryable, Unknown
recovery RecoveryAction the primary corrective step, such as Reconnect, AdjustRequest, Wait
confidence Confidence High, Medium or Low
hint string a short explanation
matchedBy string pair, subcode, code, transient_flag or none
product, source ?string which Meta product the row is about, and where the meaning came from

Helpers: isRetryable(), shouldBackOff(), requiresReconnect(), isKnown(), toArray().

How matching works

Meta reuses error codes across products, so matching goes from most to least specific:

  1. the exact (code, error_subcode) pair, such as 190:463 (token expired)
  2. the error_subcode alone, such as 2534022 (Instagram messaging window closed)
  3. the code alone, such as 613 (rate limit)
  4. Meta's own is_transient flag, if nothing above matched
  5. otherwise Unknown at Low confidence

It never guesses from a message string. An error it doesn't recognise comes back as unknown, so you can tell "we know this" from "we don't".

Coverage

109 catalogued rows covering the Graph API OAuth and permission errors, Pages publishing, Instagram media and publishing limits, Messenger and Instagram messaging windows, WhatsApp Cloud API send, template and media errors, Ads and Catalog rate limits, Facebook Live eligibility and Creator Marketplace validation. Each row has a source label naming the documentation area it came from, or observed when it was seen in real API responses rather than documented.

Meta adds and changes error codes without notice. If you hit one that is missing or wrong, please open an issue or a PR with a link to Meta's documentation or a sample response.

Development

License

MIT


All versions of meta-graph-errors with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package raaabdullah1/meta-graph-errors contains the following files

Loading the files please wait ...