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

Used Same Code getting error #190

Closed
mehulsbhandari opened this issue May 2, 2016 · 4 comments
Closed

Used Same Code getting error #190

mehulsbhandari opened this issue May 2, 2016 · 4 comments

Comments

@mehulsbhandari
Copy link

{"errors":[{"code":32,"message":"Could not authenticate you."}]}

Please Help

@J7mbo
Copy link
Owner

J7mbo commented May 9, 2016

Could you post your code?

@ghost
Copy link

ghost commented May 14, 2016

@J7mbo Hi, thanks for the library, but I can't make it work.
I'm getting the same error (code 32) with this code:

$this->config = [
            'oauth_access_token' => Configure::read('Twitter.oauth_access_token'),
            'oauth_access_token_secret' => Configure::read('Twitter.oauth_access_token_secret'),
            'consumer_key' => Configure::read('Twitter.consumer_key'),
            'consumer_secret' => Configure::read('Twitter.consumer_secret')
        ];
$this->apiUrl = 'https://api.twitter.com/1.1/';

$apiEndpoint = 'statuses/user_timeline'; // or 'users/show'
$getfield = '?screen_name=username';
$twitterApi = new TwitterAPIExchange($this->config);
        $return = $twitterApi->buildOauth($this->apiUrl.$apiEndpoint.'.json', "GET")
            ->setGetfield($getfield)
            ->performRequest();

Could you please help me with this issue?

Thanks in advance.

@hugovk
Copy link
Contributor

hugovk commented Jun 8, 2016

@kdimrus You could try setGetfield before buildOauth; see #54 (comment)

If that doesn't help, try #172

@ghost
Copy link

ghost commented Jun 8, 2016

@J7mbo Thanks for your reply,

You could try setGetfield before buildOauth

It works for me, thanks

@J7mbo J7mbo closed this as completed Jul 25, 2016
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