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

The URL detection interface for the Facebook SDK for PHP

The URL detection interface allows you to overwrite the default URL detection logic by coding to the Facebook\Url\UrlDetectionInterface.

Facebook\Url\UrlDetectionInterface

If you're using a web framework that handles routes and URL generation for you, you might want to code a custom URL detection handler to ensure that your URL's are being generated consistently.

For example if you are using Laravel, a custom handler might look like this:

use Facebook\Url\UrlDetectionInterface;

class MyLaravelUrlDetectionHandler implements UrlDetectionInterface
{
  /**
   * [@inheritdoc](https://github.com/inheritdoc)
   */
  public function getCurrentUrl()
  {
    return \Request::url();
  }
}

To enable your custom URL detection implementation in the SDK, you can set an instance of the handler to the url_detection_handler config of the Facebook\Facebook super service.

$fb = new Facebook\Facebook([
  // . . .
  'url_detection_handler' => new MyLaravelUrlDetectionHandler(),
  // . . .
  ]);

Alternatively, if you're working with the Facebook\Helper\RedirectLoginHelper directly, you can inject your custom handler via the constructor.

use Facebook\Helper\RedirectLoginHelper;

$myUrlDetectionHandler = new MyLaravelUrlDetectionHandler();
$helper = new FacebookRedirectLoginHelper($fbApp, null, $myUrlDetectionHandler);

Method Reference

getCurrentUrl()

public string getCurrentUrl()

Returns the full and currently active URL.

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