iatek / jquery-socialist

jquery social media plugin that aggregates and combines Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest and.. Combine social feeds from multiple social networks or RSS in elegant layouts via this social plugin.
http://plugins.in1.com/socialist
MIT License
630 stars 214 forks source link

Twitter API 1.1 #75

Open ReallySmall opened 11 years ago

ReallySmall commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

@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 commented 11 years ago

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/iatek/jquery-socialist/issues/75#issuecomment-19475297 .

Danzig9 commented 11 years ago

Multitasking here... :)

jackoliver commented 11 years ago

+1 on this. Halp.

jrdn91 commented 11 years ago

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

TeamRainless commented 11 years ago

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/iatek/jquery-socialist/issues/75#issuecomment-19709932 .

ReallySmall commented 11 years ago

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 commented 11 years ago

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

jrdn91 commented 11 years ago

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

KDCinfo commented 11 years ago

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 commented 11 years ago

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 commented 10 years ago

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