jquery-socialist icon indicating copy to clipboard operation
jquery-socialist copied to clipboard

Twitter API 1.1

Open ReallySmall opened this issue 12 years ago • 16 comments

Hi - nice plugin!

Apologies if I've missed a notification of this, but are there plans to update to work with Twitter's 1.1 API? As of today OAuth seems to be required so I'm not getting any results.

ReallySmall avatar Jun 12 '13 12:06 ReallySmall

Same here. I've seen no update to this or the Google+ problem. Is this just going to be dropped or will there be updates to these issues? Thanx

Danzig9 avatar Jun 12 '13 15:06 Danzig9

This is the most straightforward run-through I've come across so far of what's required for basic read-only access to twitter feeds:http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/

Possible but requires a server-side element to keep api keys private.

ReallySmall avatar Jun 12 '13 20:06 ReallySmall

The server side auth issue is now a BIG problem with the deprecation of the Twitter v1 API. I'm investigating other ways is could be handled via client side Javascript. Perhaps there is a proxy or tool like Apigee that could be used. In the meantime, Twitter is not going to work.

iatek avatar Jun 13 '13 13:06 iatek

Actually it seems the whole app is not working now... not just the twitter part... and I don't even have any twitter IDs in the script...

EDIT: Scratch that... I think my version of jQuery just wasn't working. Changed it and it's working fine now. (Well... did that and got rid of the twitter feeds.)

I'm trying to implement this:

$.getJSON('twit.php',

    function(feeds) {

        //alert(feeds);

        var feedHTML = '';

        var displayCounter = 1;

        for (var i=0; i<feeds.length; i++) {

            var tweetscreenname = feeds[i].user.name;

            var tweetusername = feeds[i].user.screen_name;

            var profileimage = feeds[i].user.profile_image_url_https;

            var status = feeds[i].text;

            var isaretweet = false;

            var isdirect = false;

            var tweetid = feeds[i].id_str;

Where it would just call up a php file that does an application-only Oauth. Then you just put all your info in a php (or in a database that would be loaded by a php) and then you can do the exact same searches. Thoughts?

TeamRainless avatar Jun 14 '13 08:06 TeamRainless

@TeamRainless This information may help with your idea. http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/ < I don't currently have time to check it out. Let us know if it helps.

Danzig9 avatar Jun 14 '13 18:06 Danzig9

That's actually exactly what I posted. :)

On Fri, Jun 14, 2013 at 8:58 PM, Danzig9 [email protected] wrote:

@TeamRainless https://github.com/TeamRainless This information may help with your idea. http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/< I don't currently have time to check it out. Let us know if it helps.

— Reply to this email directly or view it on GitHubhttps://github.com/iatek/jquery-socialist/issues/75#issuecomment-19475297 .

TeamRainless avatar Jun 14 '13 20:06 TeamRainless

Multitasking here... :)

Danzig9 avatar Jun 14 '13 20:06 Danzig9

+1 on this. Halp.

jackoliver avatar Jun 19 '13 19:06 jackoliver

Yeah I'm getting a 401 (gone) error with the twitter feed now

jrdn91 avatar Jul 01 '13 17:07 jrdn91

You're lucky to get that. :)

I'll start working on it again after I finish the website I'm working on.

-DH

On Wed, Jun 19, 2013 at 9:49 PM, jackoliver [email protected]:

+1 on this. Halp.

— Reply to this email directly or view it on GitHubhttps://github.com/iatek/jquery-socialist/issues/75#issuecomment-19709932 .

TeamRainless avatar Jul 01 '13 18:07 TeamRainless

Using https://github.com/J7mbo/twitter-api-php I've now got a populated page of json formatted tweets on a php page. I'm just not exactly sure how to tweak the socialist plugin to work with this?

For the Twitter call I've got:

twitter:{url:'twitterfeed.php?include_entities=true&include_rts=true&screen_name=|id|&count=|num|',dataType:"jsonp",img:'',parser:{ name: "twitter", resultsSelector: "data", heading: "Twitter", headingSelector: "item.user.screen_name", txtSelector: "item.text", dateSelector: "helpers.timeAgo(helpers.fixTwitterDate(item.created_at))", imgSrcSelector: "(item.user.profile_image_url)||'/assets/spacer.gif'", imgSrcProcessor: null, imgHrefSelector: "((item.entities.urls[0]||{urls:''}).url)||'http://www.twitter.com/'+item.user.screen_name", imgAltSelector: "item.user.screen_name", link: "#", preProcessor: null, preCondition: "true"} },

I suspect just substituting the twitter json file link for my php file is oversimplifying it...is there anything I need to change about the way this is parsed to get results back?

ReallySmall avatar Jul 05 '13 14:07 ReallySmall

Ah, just needed to use json instead of jsonp as dataType.

ReallySmall avatar Jul 08 '13 12:07 ReallySmall

Any fixes for this yet? I'm still getting errors with the twitter api on my end

jrdn91 avatar Jul 19 '13 18:07 jrdn91

Just downloaded this. Looks extremely promising, however, getting the following error when using a Twitter ID:

{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}

KDCinfo avatar Aug 21 '13 09:08 KDCinfo

The plugin as it is won't work with Twitter any more - with the switch-over to API 1.1, authorisation is required using a registered twitter app to get data back. If you have access to create a php page, you can get your tweets using this: https://github.com/J7mbo/twitter-api-php and then modify this script to point to your new php page to retrieve them.

ReallySmall avatar Aug 21 '13 09:08 ReallySmall

@ReallySmall It sounds like you found a solution to the Twitter API issue. I think that there may be similar OAuth issues with some other APIs (I've seen people mention Google+) but I am assuming that a similar fix is perfectly do-able, given time. Since this project hasn't been touched since the Twitter API 1.1 Update how about a fork with fixes, starting with your Twitter fix?

simonseddon avatar Jan 15 '14 11:01 simonseddon