I’m using this library for Facebook graph API access within my codeigniter project:
http://www.haughin.com/code/facebook/
My web app uses the Facebook JS SDK to authenticate users client-side, then immediately after a login is completed the user’s user-id and session object are sent to my server via an AJAX request. I want to make a call to the graph API from the server to receive the user’s basic information, so I’m wondering if there’s a way I can bypass the need to call the facebook->login() method to receive a session via a redirect from facebook? Anyone know how to do this?
I don’t recommend the Facebook SDK at all. You have a lot more control if you do things yourself and it becomes a lot simpler. Just set up a cURL function like:
And then a Facebook api function like:
Then you can make your request to the graph api like:
fb_api('me', $access_token);