Welcome Guest, Not a member yet? Register   Sign In
Help With My Facebook & CI App (Outside of FB Canvas)
#1

[eluser]Jay Logan[/eluser]
Hello. I am working on a blog for my company and I want to give the bloggers an easy way to publish to Facebook and Twitter. So after using Tweetdeck, I decided I want to give the bloggers checkbox options to post to those sites. Right now I'm working on the Facebook publishing. Keep in mind that this blog application will run outside of the Facebook "canvas". You can sample the FB app here: http://174.120.9.94/~lazylog/

I have most of the feature complete but am running into a problem. A user can successfully log in from my site, check the Facebook option, and publish text from my site to their FB wall. The problem is if a user logs out from Facebook.com and still tries to view my site. They see this error:

Code:
Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in /home/lazylog/public_html/system/application/libraries/facebook/facebookapi_php5_restlib.php:3024 Stack trace: #0 /home/lazylog/public_html/system/application/libraries/facebook/facebookapi_php5_restlib.php(1621): FacebookRestClient->call_method('facebook.users....', Array) #1 /home/lazylog/public_html/system/application/libraries/Fbook.php(37): FacebookRestClient->users_getInfo('1556843022', Array) #2 /home/lazylog/public_html/system/libraries/Loader.php(931): Fbook->Fbook() #3 /home/lazylog/public_html/system/libraries/Loader.php(829): CI_Loader->_ci_init_class('Fbook', '', NULL, NULL) #4 /home/lazylog/public_html/system/libraries/Loader.php(96): CI_Loader->_ci_load_class('fbook', NULL, NULL) #5 /home/lazylog/public_html/system/application/controllers/welcome.php(12): CI_Loader->library('fbook') #6 /home/lazylog/public_html/system/codeigniter/CodeIgniter.php(232): Welcome->index() #7 /home/lazylog/publi in /home/lazylog/public_html/system/application/libraries/facebook/facebookapi_php5_restlib.php on line 3024

This is because their are Facebook cookies still stored on the computer. The only way to get it to work is to clear cookies. And it looks like the cookie names are different for each computer. Any suggestions on how to fix this?
#2

[eluser]Jay Logan[/eluser]
I think I found a decent workaround using Javascript. Feel free to test it out.




Theme © iAndrew 2016 - Forum software by © MyBB