[support] Redirecting To External Page For OAuth
Steve Edwards
killshot91 at gmail.com
Thu Oct 13 15:07:30 UTC 2011
I'm working on a module to integrate with the Piryx API, and per the OAuth documentation, I should be redirected to an external page where the user can allow access to my application. The problem is that I'm using drupal_http_request():
$response = drupal_http_request($url, $headers, 'GET', $data);
to get the data, and the page markup is returned in $response->data instead of redirecting me to the external page (if I put the URL in my browser, it brings up the page fine). Is there something I can do to redirect to the external URL so the user can allow access, or do I just somehow need to use the markup to display it in my site?
I have a page callback function defined, but then the problem is getting the markup to the page function. drupal_goto() allows me to pass items in the URL, but this is a significant amount of markup that would create the URL from hell, so I don't want to do it that way. If put it in $GLOBALS in my form submit function, for some reason it isn't available when I get to my page callback.
This is my first foray into OAuth, so if there is a better way to do what I need to do, I'm all ears.
Thanks.
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20111013/708dfae8/attachment.html
More information about the support
mailing list