Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
How to use the Facebook Graph SDK (2017)
torsten
July 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
Harro
July 2017
Assuming the redirect loop is caused by the redirect in your code, what is the Exception?
torsten
July 2017
You must provide an access token.
torsten
July 2017
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
torsten
July 2017
Can somebody help me?
Harro
July 2017
I think you stand a better chance on another platform, like StackOverflow, since I feel this is more SDK related than Fuel related.
torsten
July 2017
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.
Harro
July 2017
Accepted Answer
Ok. Sorry I can't help you.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
July 2017
torsten
July 2017