PHP Classes

getting oauth_client class to work with Stocktwits

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  getting oauth_client class to work...  >  (Un) Subscribe thread alerts  
Subject:getting oauth_client class to work...
Summary:doesn't work
Messages:15
Author:Dirk Vandycke
Date:2013-02-10 03:12:40
Update:2013-03-02 10:35:34
 
  1 - 10   11 - 15  

  11. Re: getting oauth_client class to work...   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2013-02-21 01:28:25 - In reply to message 10 from Manuel Lemos
Hi Manuel,

this finally got me looking in the right direction
everything was (as you first mentioned) working fine on your end
it turned out to be this stupid php configuration with session file permissions

thanks 4 getting me on track

  12. Re: getting oauth_client class to work...   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2013-03-01 23:21:52 - In reply to message 11 from Dirk Vandycke
Hi Manuel,

Me again. Everything works fine for twitter and stocktwits when I run my php script manually (calling it from a webbrower)

However when I let cron call the php, the twiiter still works but the stocktwits can't get the access token anymore

Any idea what's going wrong?

I use the exact same code for twitter and that works fine but calling it from a webbrowser and from cron

regards
dirk

  13. Re: getting oauth_client class to work...   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2013-03-01 23:44:52 - In reply to message 10 from Manuel Lemos
This might point to the problem I'm having

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/monest.net/httpdocs/test/dirk/twitter/oauth/oauth_client.php:1730) in /var/www/vhosts/monest.net/httpdocs/test/dirk/twitter/oauth/oauth_client.php on line 1846
Unable to get access token

  14. Re: getting oauth_client class to work...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-03-02 08:08:10 - In reply to message 12 from Dirk Vandycke
The example scripts are meant to be used only on the Web because the OAuth protocol requires the presence of the user to grant permission to access the API.

If you want to just make an API call, do not call the Process function. Just set the access_token and access_token_secret variables manually with previously obtained values and call the CallAPI function. That will work while the token is valid.

  15. Re: getting oauth_client class to work...   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2013-03-02 10:35:34 - In reply to message 14 from Manuel Lemos
works like a charm
thanks!

 
  1 - 10   11 - 15