I have used this plugin on my website to display tweets, but even the plugin site has the problem:
http://coda.co.za/content/projects/jquery.twitter/
Code:
<div class="columns">
<pre class="code">
jQuery(function($){
$("#twitter").tweet({
join_text: "auto",
username: "Jquery",
avatar_size: 48,
count: 4,
auto_join_text_default: "",
auto_join_text_ed: "",
auto_join_text_ing: "",
auto_join_text_reply: "",
auto_join_text_url: "",
loading_text: "loading tweets..."
});
});
</pre>
<div id="twitter"></div>
Every third party plug-in (I think) is not working any more. I have seen also:
So, what would be the replacement?
If you have visited the links above you might have understood, where is the problem.
Since twitter has changed from non authenticated
1.0
API to OAuth1.1
, you now have to proxy the API request through PHP if you want to use that plugin.Here's the PHP to proxy the request. Create this page as
twitter-proxy.php
in your site, and update the values of oauth_access_token, oauth_access_token_secret, consumer_key, consumer_secret and screen_name to reflect your own Twitter account.Visit https://dev.twitter.com/apps if you need to create an application to get these values.
Now replace the existing
build_api_url
function in yourjquery.tweets.js
file with the function below, making sure you replace yoursite.comUpdate 2014-12-17: As of 2014-02-27, Twitter requires the use of SSL to connect to its API servers. I have updated the code to reflect this.
Basically the message returning from twitter is as follows:
you need to use plugin that is written for v1.1, in new version they have added security layer so you need to be authorized in order to get the tweets via API, here are the links that will be helpful for you
http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/ http://www.fullondesign.co.uk/coding/2516-how-use-twitter-oauth-1-1-javascriptjquery.htm
You can use this version of jQuery.tweet.js instead of that. https://github.com/StanScates/Tweet.js-Mod more information from https://github.com/seaofclouds/tweet/issues/264
see: https://dev.twitter.com/discussions/10193 and https://github.com/StanScates/Tweet.js-Mod for a solution to the twitter api 1.1 compatibility issue
You can no-longer use the Twitter
1.0
API as they retired it on June 11th 2013.You can see the cause of the problem if you try and request the
1.0
API, like this:https://api.twitter.com/1/statuses/user_timeline.json?screen_name=omgmog
The only way to get Tweets on to your site now is to either:
1.1
API, and then modify thejquery.tweet.js
plugin to use that.You can read more about the
1.1
API here: https://dev.twitter.com/docs/api/1.1/overviewIt's really annoying, I've got a bunch of sites that need to be migrated now