Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notice: Undefined index: code in $accesstoken = $stocktwits->getAccessToken($_GET['code']); #1

Open
Ravindrage opened this issue Apr 27, 2018 · 2 comments

Comments

@Ravindrage
Copy link

Hello Sir,
This Library is very nice . I am a php developer and want to auto post from my website on Stockwits
Getting some issue .
How to get this " code " In my php Script .

@a3igner
Copy link

a3igner commented Jun 3, 2018

I am having trouble as well. I can't get to authorize from running the php script only. Did you get this to work in the end?

@eblair84
Copy link

From what I've learned about the Oauth 2.0 spec in the last few months of studying, StockTwits does not really implement the spec in a "true Oauth" form. One of their (inexplicable) deviations is the "code" mentioned in this thread.

Once you've received "authorization" from a user/visitor to use their access to the ST platform, the platform then redirects you back to your site via URL and attaches the code to the URL. That is, URL -> www.example.com/your_landing_page.php?code=<long_code_here>. Then you take that code and couple it w/ your client key/client id and your client secret to get a "token". Then you can make most API calls with it. Please let me know if I can help additionally with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants