Python Twitter library: which one? [closed]

python-twitter should cover the first four requirements. I’ve used it before, and it’s fairly easy to start developing with it. For leveraging Twitter’s streaming API, I would recommend tweetstream. It’s a fantastic Python module that grabs tweets in real-time as they are posted. Based on whether you have gardenhose/firehose access to the twitter stream, you’ll … Read more

How can I do OAuth request by open new window, instead of redirect user from current page?

Assuming you’re opening authentication url in a pop-up using window.open(), you can access parent window by using: window.opener and to reload parent window (from a pop-up) use: window.opener.location.reload(); This code should be served on url that you’ve set up as success callback url of oauth authorization. In general, the flow should be: open a pop-up … Read more

Misalignment of Facebook & Twitter buttons

I fixed this by adding vertical-align:top (This is when using their new HTML5 markup). My facebook button code now looks like: <script>(function(d){ var js, id = ‘facebook-jssdk’; if (d.getElementById(id)) {return;} js = d.createElement(‘script’); js.id = id; js.async = true; js.src = “//connect.facebook.net/en_US/all.js#xfbml=1″; d.getElementsByTagName(‘head’)[0].appendChild(js); }(document));</script> <div class=”fb-like” data-send=”false” data-layout=”button_count” data-width=”100″ data- show-faces=”false” style=”vertical-align:top;zoom:1;*display:inline”> </div> I also … Read more

How to retrieve all tweets from a user and not just the first 3,200 as Twitter limits it’s timeline and API to

You can use twitter search page to bypass 3,200 limit. However you have to scroll down many times in the search results page. For example, I searched tweets from @beyinsiz_adam. This is the link of search results: https://twitter.com/search?q=from%3Abeyinsiz_adam&src=typd&f=realtime Now in order to scroll down many times, you can use the following javascript code. var myVar=setInterval(function(){myTimer()},1000); … Read more

Authenticate and request a user’s timeline with Twitter API 1.1 oAuth

Here is what I did to get this working in a simple example. I had to generate an oAuth consumer key and secret from Twitter at: https://dev.twitter.com/apps/new I deserialized the authentication object first to get the token and type back in order to authenticate the timeline call. The timeline call simply reads the json as … Read more

Twitter API error 215

So, it seems Twitter’s latest API 1.1 does not allow access without authentication – even for data that is seemingly public…like the latest 3 tweets from a timeline. The best article I have found on this (which gives a great solution) for read-access can be found here: http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/ I have followed the steps in the … Read more

regex for Twitter username

(?<=^|(?<=[^a-zA-Z0-9-_\.]))@([A-Za-z]+[A-Za-z0-9-_]+) I’ve used this as it disregards emails. Here is a sample tweet: @Hello how are @you doing @my_friend, email @000 me @ whats.up@example.com @shahmirj Matches: @Hello @you @my_friend @shahmirj It will also work for hashtags, I use the same expression with the @ changed to #.

Today’s XSS onmouseover exploit on twitter.com

The vulnerability is because URLs were not being parsed properly. For example, the following URL is posted to Twitter: http://thisisatest.com/@”onmouseover=”alert(‘test xss’)”/ Twitter treats this as the URL. When it is parsed Twitter wraps a link around that code, so the HTML now looks like: <a href=”http://thisisatest.com/@”onmouseover=”alert(‘test xss’)”rel/” target=”_blank” =””>http://thisisatest.com/@”onmouseover=”alert(‘test xss’)”/</a></span> You can see that by … Read more

Why couldn’t twitter scale by adding servers the way sites like facebook have?

It’s not that Rails doesn’t scale, but rather, requests for “live” data in Ruby (or any interpreted language) do not scale, as they are comparatively far more expensive both in terms of CPU & memory utilization than their compiled language counterparts. Now, were Twitter a different type of service, one that had the same enormous … Read more

What is the best Twitter API wrapper/library for .NET? [closed]

Microsoft.Owin.Security.Twitter for authentication + custom C# code with HttpClient and Json.NET Something like: using (var client = new HttpClient()) { client.BaseAddress = new Uri(“https://api.twitter.com/1.1/”); client.DefaultRequestHeaders.Authorization = authValue; var response = await client.GetAsync(“search/tweets.json”); if (response.IsSuccessStatusCode) { var json = await response.Content.ReadAsStringAsync(); var tweets = JsonConvert.DeserializeObject<Tweets>(json); } } Good read: Extending HttpClient with OAuth to Access Twitter … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)