This question was asked already, but the accepted answer is not helpful as the poster seems to have figured it out themself and left out how they got the access token.
Posting on Facebook wall from Codeigniter app
Anyhow, it seems that I can redirect to the login url and log in , but its not finding the auth token. Throwing this error:
Fatal error: Uncaught OAuthException: An active access token must be
used to query information about the current user. thrown in
/home/howekevin/biologicalfinder.com/dev/application/libraries/base_facebook.php
on line 1040
Also, if you use the example on the SDK and var_dump $user, I’m getting int 0 even after I’m logged in. I notice it’s using a lot of $GET array stuff, and CodeIgniter doesn’t jive with that. Has anyone solved this issue?
Ahh, so you found Elliot’s broken code. Give my oauth library a spin:
http://getsparks.org/packages/codeigniter-oauth/versions/HEAD/show
Or Phil Sturgeon’s:
http://getsparks.org/packages/oauth2/versions/HEAD/show
Our code should actually work ; )
Mind you mine and Phil’s libraries only handle auth, but seems that’s what you’re having trouble with at the moment (and it’s the hardest part). Check out the Facebook developer docs for the rest (if you can make a POST request, you can do this).