Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to use the Facebook Graph SDK (2017)
  • Hello Friends,

    i want to use the Facebook Graph SDK on a Fuelphp Application.

    In the past i used the Fuelphp Social Package but its to old i think so i want to use the up-to date Facebook PHP SDK (https://github.com/facebook/php-graph-sdk/)

    I dont know how to use the SDK with Fuelphp

    Can somebody give me a example how to use the Facebook Graph SDK with fuelphp?


    I try

    [code]try {

              $accessToken = $helper->getAccessToken();
              //$longLivedAccessToken = $accessToken->extend();

              $response = $this->fb->get('/me/accounts', $accessToken);
              print_r($response);

            } catch(Exception $e) {

              $permissions = ['publish_actions', 'manage_pages', 'user_photos', 'user_videos', 'publish_pages'];
              Response::redirect( $helper->getLoginUrl( Uri::base().'pages/update', $permissions) );


            }[/code]

    But this will redirect in a endless loop

    What i need is

    I want to load all facebook pages from the user with a long live token.

    Can somebody help me?

    If you need more informations please ask 

  • Assuming the redirect loop is caused by the redirect in your code, what is the Exception?
  • You must provide an access token.
  • The Problem is something with the csrf token (not persist to session)

    a few hours before is ee a exception that there is a issue with the csrf token
  • Can somebody help me?
  • I think you stand a better chance on another platform, like StackOverflow, since I feel this is more SDK related than Fuel related.
  • The Question is if somebody know a Package like the social package for fuel but with more actual facebook sdk. the social packages used the old one.
  • HarroHarro
    Accepted Answer
    Ok. Sorry I can't help you.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion