Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter API 1.1 #75

Open
ReallySmall opened this issue Jun 12, 2013 · 16 comments
Open

Twitter API 1.1 #75

ReallySmall opened this issue Jun 12, 2013 · 16 comments

Comments

@ReallySmall
Copy link

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.

@Danzig9
Copy link

Danzig9 commented Jun 12, 2013

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

@ReallySmall
Copy link
Author

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.

@iatek
Copy link
Owner

iatek commented Jun 13, 2013

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.

@TeamRainless
Copy link

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?

@Danzig9
Copy link

Danzig9 commented Jun 14, 2013

@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.

@TeamRainless
Copy link

That's actually exactly what I posted. :)

On Fri, Jun 14, 2013 at 8:58 PM, Danzig9 notifications@github.com 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//issues/75#issuecomment-19475297
.

@Danzig9
Copy link

Danzig9 commented Jun 14, 2013

Multitasking here... :)

@jackoliver
Copy link

+1 on this. Halp.

@jrdn91
Copy link

jrdn91 commented Jul 1, 2013

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

@TeamRainless
Copy link

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 notifications@github.comwrote:

+1 on this. Halp.


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

@ReallySmall
Copy link
Author

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
Copy link
Author

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

@jrdn91
Copy link

jrdn91 commented Jul 19, 2013

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

@KDCinfo
Copy link

KDCinfo commented Aug 21, 2013

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}]}

@ReallySmall
Copy link
Author

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.

@simonseddon
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants