Code Monkey home page Code Monkey logo

cowitter's Introduction

cowitter's People

Contributors

amirsarhang avatar hexium310 avatar kb10uy avatar mpyw avatar scrutinizer-auto-fixer avatar sololance avatar suzutan avatar yarnaimo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cowitter's Issues

proxy support

$status = $client->post('statuses/update', ['status' => 'Proxy Tweet.'], 'https://111.222.333.444:8080');

Proxy Not Supporting .. :(

Example exception 'oob'

Please, can you give an example code, when an exception is thrown 'oob' and it is necessary to enter your email or phone?

->login() method stopped working

PHP | 7.3.8

Hi,

The login() method has not been working for a couple of days. The code has not changed.

$tw = new mpyw\Cowitter\Client(
            [
                self::CONSUMER_KEY, self::CONSUMER_SECRET
            ], [
                'CURLOPT_USERAGENT' => self::USER_AGENT
            ]
        );

$client = $tw->login($username, $password);

Error is issued:
Wrong username or password. Otherwise, you may have to verify your email address.

But the username and password are exactly correct, for example, on the twitter site, authorization is successful.

Any thoughts?

Add delete, put methods

Hello!

First of all, thank you for nice library. It's really fast and works fine.

However, I'm having trouble with missing DELETE and PUT methods.

Can we implement it as well?

Example:

  1. Delete: Post method doesn't work for deleting messages we need to send 'DELETE'
    https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/delete-welcome-message-rule

  2. Put: Same issue like Delete, need to send 'DELETE'

https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/aaa-premium#put-account-activity-all-env-name-webhooks-webhook-id

Thank you in advance!

Examples need updating?

for example the code using $status->screen_name only works for me if I change it to $status->user->screen_name ...

TwistOAuth::login に正しいSN/PWを渡しても、ユーザネームかパスワードが間違っているという例外がスローされることがある。

内容と原因

  • TwistOAuth::login (おそらくTwistOAuth::multiLoginも) に、正しい $username$password を渡しても、ユーザネームかパスワードが間違っている…と例外スローが返ってくる**(ログ1)**。
  • 原因としては、長いことログインしていない、若しくは普段使わないIP空の不審なログイン試行の場合に、個人情報を認証するページが表示されてしまうため**(ログ2)**。

ログ1

object(TwistException)#3 (7) { 
["message":protected]=> string(27) "Wrong username or password." 
["string":"Exception":private]=> string(0) "" 
["code":protected]=> int(200) 
["file":protected]=> string(94) "省略/twistoauth/src/TwistOAuth.php" 
["line":protected]=> int(1251) 
["trace":"Exception":private]=> array(3) { 
  [0]=> array(6) { 
    ["file"]=> string(94) "省略/twistoauth/src/TwistOAuth.php" 
    ["line"]=> int(66) 
    ["function"]=> string(13) "parseVerifier" 
    ["class"]=> string(10) "TwistOAuth" 
    ["type"]=> string(2) "::" 
    ["args"]=> array(2) { 
      [0]=> resource(12) of type (curl) 
      [1]=> string(22396) " 

ログ2

  <div class="PageContainer">
        <div class="Section">
      <div class="PageHeader">アカウントの安全のために</div>
      <p>
        Twitterアカウントに登録したメールアドレスを入力して認証してください。
      </p>
        <p>
          <a href="https://support.twitter.com/articles/20171250-im-being-asked-for-additional-information-when-i-sign-up-or-log-in?ref=password_reset">この情報が必要な理由</a>
        </p>
        <p>
          ヒント <strong>aa*****************@test.com</strong>
        </p>
        <form action="/account/login_challenge" id="login-challenge-form" method="post" class="Form">
         <div id="error-message" class="Form-message is-errored"></div>
          <input type="hidden" name="authenticity_token" value="XXXXXXXXXXXXXXXXX(AT省略)"/>
          <input type="hidden" name="challenge_id" value="XXXXXXXXXXXXXXXXXX(なんのID?省略)"/>
          <input type="hidden" name="user_id" value="XXXXXXXXXX(ユーザID省略)"/>
          <input type="hidden" name="challenge_type" value="RetypeEmail"/>
          <input type="hidden" name="platform" value="web"/>
          <input type="hidden" name="redirect_after_login" value="/"/>
          <input type="hidden" name="remember_me" value="false"/>
          <label for="challenge_response" class="u-hiddenVisually">メールアドレス</label>
            <input type="text" id="challenge_response" name="challenge_response" class="Form-textbox" value="" autofocus/>
          <input type="submit" id="email_challenge_submit" value="送信" class="Button"/>
        </form>
      <p class="Help">
          <a href="https://support.twitter.com/forms/lockout_bit_survey">問題を報告する</a>
      </p>
    </div>
  </div>

実行環境

実行環境が起因したエラーではないが念のため。

  • PHP Version 5.6.18

対応について

  • メールアドレスによる個人情報の認証が必要、的な例外エラーをスローする処理が欲しい。
  • 欲を言えば、登録しているメールアドレスを引数に渡せば、個人情報の認証をやってくれる的な物があると嬉しい。
  • すみません、僕は対応できません。対応よろしくおねがいします。また情報が足りないなど有りましたらこえかけてください。情報提供します。

Client->oauthForAccessToken実行時にuidとsnが入っていない

AccessTokenを取得するAPIなのですが
https://developer.twitter.com/en/docs/basics/authentication/api-reference/access_token
のリファレンスの通り、本来であればレスポンスにuser_idとscreen_nameが入るんですが

https://github.com/mpyw/cowitter/blob/master/src/Traits/AuthenticatorTrait.php#L65-L74
の部分で、withCredentialsがOAuthトークンしか受け取らないようになっているので、この2つが切り捨てられるみたいです。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.