E
E
ernestby2014-07-15 13:50:07
PHP
ernestby, 2014-07-15 13:50:07

How to make it possible to connect to any user in the Twitter API?

I am making a plugin for CMS, I drive in the fields Consumer Key, Consumer Secret, OAuth Access Token, OAuth Access Token Secret and in the login field my login. Everything is fine, but if you enter another login, it still shows my tweets, and if you leave the login field empty, then all my tweets are displayed. I understand that it's the keys, but I'm creating a plugin for everyone and would like anyone to be able to use it.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vladlen Grachev, 2014-07-16
@ernestby

You log in every time by using your OAuth Access Token, OAuth Access Token Secret. Recently I just wrote an adapter for Twitter, you can take a look . Look aside prepareAuthParams () - generating the URL that the user must go to for authorization; and authenticate() - in fact, processing what Twitter returned after authorization was approved.
Or use this library . She is very good too. Readme and examples should be enough to understand how to work with it.

D
Dmitry Entelis, 2014-07-15
@DmitriyEntelis

You are either using the wrong api method, or you have done crooked authorization.

D
Dmitry Vasilyuk, 2014-07-15
@vasilukwolf

Code to the studio! Preferably GitHub.

D
Denis Morozov, 2014-07-15
@morozovdenis

I drive in the fields Consumer Key, Consumer Secret, OAuth Access Token, OAuth Access Token Secret

OAuth Access Token, OAuth Access Token Secret - you must receive this data using your login and password, for another user it will be completely different data
en.wikipedia.org/wiki/OAuth

E
ernestby, 2014-07-16
@ernestby

Solved, the problem was in one character
Instead of &count it was written ?count

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question