ラベル Twitter の投稿を表示しています。 すべての投稿を表示
ラベル Twitter の投稿を表示しています。 すべての投稿を表示

2018年4月4日水曜日

Hulu で配信しているジャイアンツライブを通知してくれるボットを作成しました

hulu_giants_icon.jpg

概要

作りましたというか 1 年前に作っていたのですがググってもボットが検索に引っかからないのでググラビリティを上げるために記事にしておきます
作成したのは Twitter ボットです

ボットの動き

以下の 2 パターンでボットはつぶやきます

  1. 配信がある場合にその日の AM 9:00 につぶやきます
  2. 配信開始の 5 分前くらいに再度つぶやきます

なので 1 日 2 回つぶやいてくれます

使い方

https://twitter.com/hulu_giants

このアカウントをフォローするだけでも自分のタイムラインに出てくるので、それで問題なければフォローだけしてください

メンション等はしていないので基本プッシュ通知などは来ません
なので通知がほしい場合は IFTTT などを使ってください
自分は

これで Slack に通知しています

これを使えば LINE にも通知してくれます
ちなみにこれらの Applet は自分で作成したものではございません
公開されている Applet をありがたく利用させてもらっています

その他

たまーにメンテなどをしているので人間がつぶやくこともあるのでご了承ください
フォロー返しなどは特にしていないので、興味があればフォローして好きに使ってください

Hulu をずっと使っていてライブの通知をしてほしいなーと思っていたのですがなかったので作りました
が、実は自分はもう hulu を解約してしまってボットも使っていないのでよくわからない感じになっています

2014年1月16日木曜日

【Twitter】twitterIdとscreenNameを調べる方法

APIの仕様変更とかでいろいろと死んでいるサイトがいるので生存しているサイトを忘れないようにメモ

http://nojimi.dip.jp/idsnconv/

http://twitter.com/intent/user?screen_name=kakakikikeke
のソースコード内にtwitterIdがあるのでそれでもわかるみたい

  • twitterId・・・普遍的なもの、アカウント作成時から変更することはできない、基本はユーザの目につくものではない、数字の羅列で自動生成される
  • screenName・・・Twitterのアカウント名みたいなのもの、変更可能でユーザが目にするアカウント情報

2012年12月14日金曜日

Twitterのあるアカウントが凍結されているか確認する方法

TwitterのAPIにはどうやらないみたいです。

ってことでAPIを使わないでも簡単に確認できる方法を紹介します。


RESULT=`curl "https://twitter.com/kakakikikeke" | wc -l`; echo $RESULT;


これでRESULTが0以外なら凍結(suspend)されてないことになります。

逆に0なら凍結状態ってことになります。

シェルスクリプトでかけるので、あとはforとか駆使すれば一気に確認できると思います。

2012年6月8日金曜日

【TwitterException】statusCode=403, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.5}

なんてエラーに襲われた時は以下の原因が考えられます。
  1. 全くおんなじつぶやきを行おうとしている
  2. 認証キーがサスペンドになっている
  3. Twtter4jが古い

1. に関しては前のつぶやきを削除するか明日またつぶやきましょう
2. に関して再度TwitterDevから認証キーを作成しましょう
3. に関しては2系じゃない方は2系への乗り換えましょう
Twitter自体APIの変更が結構あるので、SDKも入れ替える必要があります
1系だとBasic認証の可能性もあるので、1系の場合には速攻で2系に乗り換えましょう
ただし、公式サイトにもありますが、1系から2系への乗り換えには多少ソースコードの改修が入ります

他にも原因はありえそうです
「たまたま」なんてこともありえそう・・・!?

2012年3月5日月曜日

2012年3月1日木曜日

Twitterのアカウントが凍結した・・・

P.S 2013/3/1
2月25日に以下の凍結申請を出す
2月28日に実はもう一通「申請した件どうなってますか?」メールをする
3月1日なんとあぼーん解消
(意外と、2月28日の追加送信がきいたのかもしれないですねw)
(以下は2月25日に出した申請から返ってきた自動返信メールです)

初回記述
凍結してサポートに「凍結を解除してください。」みたいなメールを
送ったら以下のような返信が速攻で帰ってきた。
おそらくこれは自動送信のメールだろう。
この2,3日後に本当にどうなったかの結果メールがくるのだろう。
結構大事にしてたアカウントだったからショックだ。。。orz
また、結果のメールが来たら共有したいものだ。
とりあえず一報ということで以下に、メモしておく。

We understand that you're contesting an account suspension. 
Please be sure to read this entire email; 
you will need to take further action in  order to reopen your ticket and trigger a review of your account. 

Twitter suspends accounts for a variety of reasons:

• If your account was suspended for aggressive following behavior, you should have received an email notification to the address associated  with your Twitter account. 
  You'll need to confirm that you've removed all prohibited following automation from your account, and will stop any  manual aggressive following behavior. 
  To expedite your appeal process, please review our Best Practices page if you haven't already, and then reply to this ticket with a confirmation that you understand our policies and will not engage in any  prohibited following behavior.

• If you didn't receive an email indicating why your account was suspended, please take a minute to review the Twitter Rules. 
  If you suspect you've been suspended for another reason, please reply to this email with a short explanation.

• If you received an email from admin@twitter.com saying 'you're being suspended' or that we're going delete your account, you're safe; the email is fake. 
  More information here https://support.twitter.com/articles/204820-safety-fake-twitter-emails

• While we strive to avoid mistakes, it's also possible that your account was suspended in error. 
  If after reviewing the Rules, you have no idea why your account was suspended, just reply to this email  indicating as much, and we'll take another look at your case. 
  Our  apologies if the error turns out to be ours.

Thanks, 
Twitter Trust & Safety

---------------------------------------------------------------------------------- 
Responding to this email will reopen this ticket and put your ticket in queue for support. 
If you do not reply, your case will be closed.  Note that you need to reply from the address this mail was sent to. 
If  you use an alias (such as username+alias@gmail.com) to manage your account, ensure that your reply comes from the alias  address or your ticket may not be seen by our support staff.
Please note, we cannot accept email attachments at this time; please include all information in the body of your request.

2012年2月20日月曜日

TwitterException{statusCode=503, retryAfter=0, rateLimitStatus=null}

Twitter4jで出た場合
おそらく
APIのリクエスト制限に引っかかっていると思われます。
確か1時間で70回以上はアウトになります。
同一IPからだと思います。
(すいません。詳しくは忘れてしまいました orz)
(調べていただけると幸いです)

2012年2月12日日曜日

警告: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="https://api.twitter.com"}

結構はまりました。。。
TwitterのAPIでタイトルのエラーでフォロー系の処理ができず。。。
原因は以下2つ

  1. 権限が「Read Only」だった
  2. 権限を「Read And Write」にした後トークンを再生成していた

トークンが変更していることに気づかなかった

なんとも情けない感じでした。
アクセスレベルはデフォルトがRead Onlyなので結構はまるかもです。