特定のユーザー名の最後のツイートを表示したい Web ページがあります。たとえばmy_username
、javascript のみを使用します (サーバー側のプログラミングは使用しません)。私が調べたところ、これを行う簡単な方法が次のとおりであることがわかりました。
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/my_username.json?callback=twitterCallback2&;count=1"></script>
しかし、現在、この方法は推奨されておらず、機能していないようです。スクリプトの実行中に次のエラーが発生します。
Blocked a frame with origin "https://platform.twitter.com" from accessing a frame with origin "null". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "file". Protocols must match.
クライアント側のみでこれを行う方法はありますか。これは、PHP/OAuth を使用しなくても実行できますか? どんな助けでも大歓迎です。ありがとう !