Closed davidfurlong closed 9 years ago
Let's write up to exactly specify what we want this feature to do. Some suggestions.
Given this, perhaps we should bypass the step of storing the tweets in the MongoDB and just throw them directly in Neo4j?
We'll want to build a particular controller that has access to the Neo4j db that is required into passport.js
So I have coded up a little of this, but am having trouble debugging. Can you take me through the set up for testing twitter signup locally?
Right not I get the error:
Error: Failed to find request token in session at Strategy.OAuthStrategy.authenticate (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport-twitter\node_modules\passport-oauth1\lib\strategy.js:142:54) at Strategy.authenticate (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport-twitter\lib\strategy.js:85:40) at attempt (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport\lib\middleware\authenticate.js:341:16) at authenticate (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport\lib\middleware\authenticate.js:342:7) at callbacks (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:164:37) at param (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:138:11) at pass (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:145:5) at Router._dispatch (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:173:5) at Object.router (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:33:10) at next (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\node_modules\connect\lib\proto.js:193:15)
Though I have switched the token code to the commented out local code in two places in passport.js
Try using 127.0.0.1 instead of localhost On 12 Nov 2014 23:20, "Will Zeng" notifications@github.com wrote:
So I have coded up a little of this, but am having trouble debugging. Can you take me through the set up for testing twitter signup locally?
Right not I get the error: ''' Error: Failed to find request token in session at Strategy.OAuthStrategy.authenticate (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport-twitter\node_modules\passport-oauth1\lib\strategy.js:142:54) at Strategy.authenticate (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport-twitter\lib\strategy.js:85:40) at attempt (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport\lib\middleware\authenticate.js:341:16) at authenticate (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\passport\lib\middleware\authenticate.js:342:7) at callbacks (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:164:37) at param (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:138:11) at pass (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\gra phdocs\node_modules\express.io\node_modules\express\lib\router\index.js:145:5) at Router._dispatch (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:173:5) at Object.router (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io\node_modules\express\lib\router\index.js:33:10) at next (C:\Users\W. J. Zeng\Documents\GraphDocs\code\clean\graphdocs\node_modules\express.io \node_modules\express\node_modules\connect\lib\proto.js:193:15) '''
Though I have switched the token code to the commented out local code in two places in passport.js
— Reply to this email directly or view it on GitHub https://github.com/willzeng/graphdocs/pull/587#issuecomment-62813986.
yep that worked! sweet.
hmm, am not getting the tweets to pull in properly. I don't see any in the compose mongoDB for the heroku that we're using either. How did you see that the tweets were actually pulled?
@davidfurlong Ok so have figured out the workflow to get signing in working and testing, but the call to get the user timeline is returning an undefined HTTP error. This is weird as I have tested it in the twitter API console and it seems to work fine.
Were you able to see the timeline data get pulled in at any point?
@willzeng this should work now
Yep that works for me. Now we need to take that string and turn it into a cograph that updates each time the use logs in?
@davidfurlong Rad. So I've got the first check box ticked off for this PR. When you sign up with twitter for the first time it takes your most recent 200 tweets and drops them into an automatically created cograph. The next step could have two paths:
We could make it so that everytime you log in with twitter, your recent tweets are merged into that special "tweet" cograph.
And/OR
We could add an 'import tweets' button to every cograph that lets your grab your most recent 'n' tweets and adds them to that cograph.
What do you think?
Flexibility is probably best. One graph that has your tweets / people you follows? Then ability to add twitter "landscapes" based on a filter as an import button on a graph
On Mon, 9 Feb 2015 15:58 Will Zeng notifications@github.com wrote:
@davidfurlong https://github.com/davidfurlong Rad. So I've got the first check box ticked off for this PR. When you sign up with twitter for the first time it takes your most recent 200 tweets and drops them into an automatically created cograph. The next step could have two paths:
We could make it so that everytime you log in with twitter, your recent tweets are merged into that special "tweet" cograph.
And/OR We could add an 'import tweets' button to every cograph that lets your grab your most recent 'n' tweets and adds them to that cograph.
What do you think?
— Reply to this email directly or view it on GitHub https://github.com/willzeng/cograph/pull/587#issuecomment-73533246.
Ok so basically both. I think the functionality is quite similar so doing one and then the other should be relatively straightforward.
@davidfurlong See todo's at top
Got the update on login functionality working @davidfurlong Check it out.
Maybe the thing to do for import is to just let people type in twitter search queries and we just give them whatever results come in?
Maybe the thing to do for import is to just let people type in twitter search queries and we just give them whatever results come in?
yeah thats cool + easy to do
Lets plan to get that and some automatic linking of them done before pushing twitter integration live on Wednesday.
On 21:09, Mon, Feb 9, 2015 David Furlong notifications@github.com wrote:
Maybe the thing to do for import is to just let people type in twitter search queries and we just give them whatever results come in?
yeah thats cool + easy to do
— Reply to this email directly or view it on GitHub https://github.com/willzeng/cograph/pull/587#issuecomment-73590575.
Yep, I don't have this bug. We'll try and replicate when you get here.
the last todo is on branch nsearch, just needs functionality
@davidfurlong The update is now fixed so that there is an auto updating functional cograph of a users tweets. Give this a check to make sure it is also working with your account.
If so, we can change the number so that initial signup pulls 200 tweets and each login checks the most recent 200? (it automatically avoids making duplicates) This should then be merge-able.
I created a new pull request for the query adder box: https://github.com/willzeng/cograph/pull/630
This is now working and stable, though when looking at the larger tweet cographs it makes me think that we should really be doing some optimizations.
can you post an example? what kind of optimizations
are we still storing it in the mongo (probably not a good idea)
Ah yes we are, and needlessly so. Go ahead and remove that.
I mean that graphview gets a little slow with 200 nodes and lots of images. Set TweetNumber to 100 and give it a try.
We should probably do some processing of the images to be smaller res when in the graph. This issue is seperate from this PR.
On 15:21, Sat, Feb 21, 2015 David Furlong notifications@github.com wrote:
are we still storing it in the mongo (probably not a good idea)
— Reply to this email directly or view it on GitHub https://github.com/willzeng/cograph/pull/587#issuecomment-75376161.
Are we good to go?
If it worked for your account then yeah. We can then do another update that includes the functional custom search box import feature.
On Tue, Feb 24, 2015 at 6:45 PM, David Furlong notifications@github.com wrote:
Are we good to go?
— Reply to this email directly or view it on GitHub https://github.com/willzeng/cograph/pull/587#issuecomment-75818889.
TODO's