I'm trying to implement a simple Gmail application in a CodeIgniter framework using the Zend Oauth library (here). The stock file works fine, of course, and it's code is here if you want (the included file common.php just has the variables for my oauth keys, etc.).
However, I've been unsuccessful at porting any version of this into the CodeIgniter framework. The problem I keep having is that once I am redirected to the Google page to verify access to my Gmail account, it doesn't ever transfer me back to my own app. It just keeps refreshing the Gmail approval page.
I've tried a barebones adaptation here where I basically just copied and pasted into a controller file.
I've also tried to integrate with some database functionality and to separate retrieving an access token and accessing gmail here.
Neither of these works and just leaves me endlessly refreshing the Gmail grant access开发者_开发问答 page.
Any thoughts?
It sounds like the OAuth callback url isn't being set, which explains why you're not being directed back to your application. Make sure you have the URL helper loaded in your controller $this->load->helper('url');
精彩评论