StanScates / Tweet.js-Mod

Basic wrapper for Seaofclouds / Tweet.js that incorporates functionality with Twitter's v1.1 API
MIT License
234 stars 103 forks source link

Username Array / Lists #5

Closed joebirkin closed 11 years ago

joebirkin commented 11 years ago

The functionality to pass in an array of usernames from the original tweet.js seems to be missing. I also had some trouble setting up a list for display, it seemed to show less tweets than the value set in "count".

Separately from this, I had to fiddle a little with the PHP to make sure it used HTTPS, and also modified it to use api.twitter.com/1.1 rather than version 1. Some of the URLs seemed incorrect, too, such as lists/list.json rather than lists/statuses.json, but that just came about while I was fiddling, might not actually impact the performance!

StanScates commented 11 years ago

@hodephinitely, To your first point, thank you for bringing this to my attention. I am looking into this and should have an updated version within the next few days.

To your second point, can you elaborate on what PHP you had to modify to make it use HTTPS? The Twitter API v1.1 only accepts authenticated HTTPS connections AFAIK and thus every endpoint -> Twitter request should be properly encrypted. Also, nowhere in any of the code should there be a reference to api.twitter.com/1/, which would kind of defeat the purpose of this modification... Can you inform me of what file/line you saw references to the old API? The API paths are essentially defined in jquery.tweet.js on lines 153, 163, 173, and 185. Please reference: https://github.com/StanScates/Tweet.js-Mod/blob/master/twitter/jquery.tweet.js

To your last point, I believe you are correct about the latter being the correct path, I will also be addressing that in the next version to follow.

Stay tuned.

joebirkin commented 11 years ago

I was basically fiddling until it worked- the console was throwing some JS errors, mainly "bad gateway" and some 404s. They generally cited "http://api.twitter.com/1/..." which is why I thought it might be the PHP cURL request going wrong somewhere down the line.

I should have mentioned it was the tmhOAuth.php that I modified, not the index.php. I added a config['v'] = 1.1 into the code and also removed the if statement that allowed an unsecured HTTP prefix.

In the JS I then changed the URL to lists/statuses.json and added the parameters "slug : s.list" and "owner_screen_name : s.username" if the list variable was present. It seems to work (up to a point) so far.

cwulff commented 11 years ago

Any word on how the change is going to be able to add back the lists functionality?

lupocreative commented 11 years ago

I just wanted to add my +1 on this. It would be really good if you could add the username arrays/lists functionality back in. I was also experiencing problems filtering on a username array with a hashtag at the same time.

StanScates commented 11 years ago

Hey guys, Sorry for the (really) late response, I've been busy with $DAYJOB and supporting my various other projects. The problem with arrays of usernames is not simply that it doesn't work, but rather my modification queries /1.1/search/tweets.json for searches, as opposed to the original Tweet.js which used search.twitter.com. I'm also aware of the problem with lists. I should be pushing an update soon, I just need to find the time :clock1130: Yours (occasionally), -Stan

cwulff commented 11 years ago

Silly day jobs :) Thanks for your attention to it whenever you get a chance. I tried to get into it, but broke the whole thing pretty substantially, so I'm definitely in the "patiently appreciative of whatever you are able to do" camp.

StanScates commented 11 years ago

StanScates/Tweet.js-Mod@b0ae9099fe365cefca43b52167d179693980e64b

emmetje commented 11 years ago

Hi Stan, I still have issues with a search query for hashtags from multiple usernames. Hope you can help me out, many thanks in advance.

StanScates commented 11 years ago

Can you please post your Tweet.js parameters in full?

emmetje commented 11 years ago

my fault used wrong parameter... sorry