Search Results

Search found 11503 results on 461 pages for 'twitter bootstrap rails'.

Page 3/461 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do I read a public twitter feed using .Net

    - by Jeff Weber
    I'm trying to read the public twitter status of a user so I can display it in my Windows Phone application. I'm using Scott Gu's example: http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx When my code comes back from the async call, I get a "System.Security.SecurityException" as soon as I try to use the e.Result. I know my uri is correct because I can plop it in the browser and get good results. Here is my relavent code: public void LoadNewsLine() { WebClient twitter = new WebClient(); twitter.DownloadStringCompleted += new DownloadStringCompletedEventHandler(twitter_DownloadStringCompleted); twitter.DownloadStringAsync(new Uri("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=krashlander")); } void twitter_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { XElement xmlTweets = XElement.Parse(e.Result); //exception thrown here! var message = from tweet in xmlTweets.Descendants("status") select tweet.Element("text").Value; //Set message and tell UI to update. //NewsLine = message.ToString(); //RaisePropertyChanged("NewsLine"); } Any ideas anyone?

    Read the article

  • How to CURL and avoid timeout death (Twitter Down) [migrated]

    - by David
    Twitter is down right now, and one of my site's home pages relies on getting data from Twitter (relies is the problem - it should be more of an accessory feature, as it just shows follow count from its feed). Here's the code in question: function socials_Twitter_GetFollowerCount($username) { $method = function () use ($username) { return file_get_contents('https://api.twitter.com/1/users/show.json?screen_name='.$username.'&include_entities=true'); }; $json = cache('bmdtwitter', 3600, $method, false); $json = json_decode($json, true); return intval($json['followers_count']); } What is a good way to make it so if Twitter is down (or not responsive for some reasonable amount of time), our site doesn't appear to be down (I think the timeout maybe defaulting to 30-60 seconds or more).

    Read the article

  • Twitter bootstrap modal loads wrong remote data

    - by Victor S
    I'm using Twitter Bootstrap modal featurs and loading data from remote locations. I'm providing the remote url for a set of thumbnails with the hope that once the thumbnail is clicked, the appropriate data (a large version of the image) is displayed. I'm using the html declarative style to define the remote urls and all the features of the modal. What I find is that Twitter bootstrap modal loads first remote url then does not display subsequent remote data, (although a request to the proper url is made in Chrome) but displays first loaded data always. How do I get it to show the proper data? View: #gallery-navigation %ul - @profile.background_images.each do |image| %li = link_to image_tag(image.background_image.url(:thumb)), remote_image_path(image.id), :role => "button", :data => {:toggle => "modal", :target => "#image-modal", :remote => remote_image_path(image.id)}, :id => "image-modal" / Modal #image-modal.modal.hide.fade(role="dialog" aria-hidden="true" data-backdrop="true") .modal-body Controller: def remote_image @image = current_user.profile.background_images.find(params[:image_id]) respond_to do |format| format.html { render :partial => "remote_image", :locals => { :image => @image } } end end

    Read the article

  • Run Rails 3 app on a Rails 2 server/machine?

    - by chucknelson
    I'm trying to run a Rail 3 (3.0.10) app on a shared joyent smartmachine server (I don't have root access) which has Rails 2 (2.3.11) installed , and I'm not sure what to do after I freeze my Rails 3 app with bundle install --deployment. It seems like with the Rails 3 and bundler gems not being installed on the server locally, my app isn't even recognizing the local version of Rails I have frozen with my app. Has anyone gotten this to work, or have any advice? The server runs Apache, and I think I can get lighttpd installed too - but I'd rather stay with Apache if I can. Also, if it matters, Passenger is not an installed gem either...and I'm not sure I can freeze that with my app. Update 11/30/2011 12:30 PM EST Bundler is not installed on this server, either. Not sure if having that would enable the new Rails 3 "freeze" (bundle --deployment) to work or not...

    Read the article

  • Marketplace to buy Templates for Twitter Bootstrap framework?

    - by Clay Nichols
    Are there any sites where I could buy a site template designed in Twitter Bootstrap (so that it's easy to modify)? I'm working on a site redesign and I think finding a template that looks close enough and modifying it is an economical way to go. (We're pretty niche so I don't need us to have a super cool website.) But folks I've talked to say that many of those templates are hard to modify. So I'm thinking that finding a template designed in a customizable framework would be easy to modify.

    Read the article

  • [iphone,twitter] Accessing the Twitter API through a proxy using NSURLConnectionsm, OAuth problem

    - by akaii
    I'm having no problems with sending an update directly via hxxps://api.twitter.com/, but the app (for the Iphone, I'm using NSURLConnections) I'm working is supposed to allow the user to select a preferred proxy (e.g. hxxps://twitter-proxy.appspot.com/api/ or hxxps://nest.onedd.net/api/), and I keep getting a 401 error (Failed to validate oauth signature and token) whenever I try to get an access token via these proxies. Even though I send my POST request to the proxy, I am still using the direct url for the api (https:// api.twitter.com/[rest api path]) in the base string. Despite the 401 error message above, the status code I'm actually getting from connection:didReceiveResponse: is 200, probably because it was able to successfully contact the proxy... Is there anything else that I need to consider when using a proxy to access the API? Should anything in the authorization header change, for example? Or the base string? I can manage to connect via Basic Auth without issue, but support for that will be dropped in a month. On a somewhat unrelated note... What are the possible causes of Twitter's error 403, and how do you distinguish between them? Is the only way to differentiate an error due to exceeding the status update limit for an hour (150 per hour) vs for a day (1000 per day) by checking the string reply returned in the response? Is there any way for me to simulate a status update limit error without going through the motions of actually sending 150/1000 tweets?

    Read the article

  • How to extend an 'unloadable' Rails plugin?

    - by Vitaly Kushner
    I'm trying to write a plugin that will extend InheritedResources. Specifically I want to rewrite some default helpers. And I'd like it to "just work" once installed, w/o any changes to application code. The functionality is provided in a module which needs to be included in a right place. The question is where? :) The first attempt was to do it in my plugin's init.rb: InheritedResources::Base.send :include, MyModule It works in production, but fails miserably in development since InheritedResource::Base declared as unloadable and so its code is reloaded on each request. So my module is there for the first request, and then its gone. InheritedResource::Base is 'pulled' in again by any controller that uses it: Class SomeController < InheritedResource::Base But no code is 'pulling in' my extension module since it is not referenced anywhere except init.rb which is not re-loaded on each request So right now I'm just including the module manually in every controller that needs it which sucks. I can't even include it once in ApplicationController because InheritedResources inherites from it and so it will override any changes back.

    Read the article

  • Error handling in Rails Controller for adding embedded Mongoid documents to Model

    - by Dragonfly
    I have a Item model that has embedded documents. Currently, the following comments_controller code will add a comment to the item successfully. However, if pushing the comment document onto the comments array on item fails, I will not know this. #this does work, but i do not know if the push fails def create comment = Comment.new(:text => params[:text]) @item.comments << comment render :text => comment end I would like to have something like this, but @item.comments << comment does not return true or false: #this does not work def create comment = Comment.new(:text => params[:text]) if @item.comments << comment render :text => comment else render :text => 'oh no' end end Nor does it throw an exception when the document push fails: #this does not work def create begin comment = Comment.new(:text => params[:text]) @item.comments << comment render :text => comment rescue Exception => e render :text => 'oh no' end end Thanks!

    Read the article

  • Can't store array in json field in postgresql (rails) can't cast Array to json

    - by Drew H
    This is the error I'm getting when I run db:migrate rake aborted! can't cast Array to json This is my table class CreateTrips < ActiveRecord::Migration def change create_table :trips do |t| t.json :flights t.timestamps end end end This is in my seeds.rb file flights = [{ depart_time_hour: 600, arrive_time_hour: 700, passengers: [ { user_id: 1, request: true } ] }] trip = Trip.create( { name: 'Flight', flights: flights.to_json } ) For some reason I can't do this. If I do this. trip = Trip.create( { name: 'Flight', flights: { flights: flights.to_json } } ) It works. I don't want this though because now I have to access the json array with trip.flights.flights. Not the behavior I'm wanting.

    Read the article

  • How do I convert a Twitter User ID to a Twitter Username

    - by codyvbrown
    Hi I'm building an app in rails that needs to convert a twitter id into the twitter username. This is the code that pulls the id. url = 'http://twitter.com/' + params[:username] buffer = open(url, 'UserAgent' = 'irb').read @vouched_user_twitter_id = buffer[/\d+(?=.rss)/] How do I use that number to pull the username once i no longer have params. Thanks!

    Read the article

  • Edit my message before posting in Twitter with Twitter API and PHP

    - by novellino
    I am having a site and I want to add a button in my site that will link to the twitter login page and after login it will post a message to the Twitter home page of the user. I used this code: http://www.matpal.com/2010/12/oauth-access-token-in-twitter-api.html and it works fine. My problem is that before posting the message I want to be able to edit it. So after login I want to see my message in an editing input (like retween do,here: http://www.mobilemarketer.com/cms/news/search/10263.html ) and post it after clicking Tweet. Does anyone know how can I do this? Thanks in advance

    Read the article

  • Using twitter gem to signup and authenticate users

    - by Jim Jones
    Hi, I'd like to allow users the option to register using their Twitter account. Basically, I'll present them with a standard signup form (name, login, email, pwd, pwd_confirm) as well as a "Signup with Twitter" link. If a user chooses to signup with Twitter creds, then I'll create a user record in db. Then I'd like to be able to allow a user to authenticate using their Twitter creds on returning visits. Also, I'm using restful_authentication, so I need to have this work within that context. What is the best way to do this? I haven't been to find any tutorials on allowing the signup and authentication pieces. Most examples just show how to authenticate a Twitter user into your app. Thanks.

    Read the article

  • Ruby: Twitter API: Get All followers

    - by user28871
    Hi, Anyone have any idea why the next cursor isn't changing in the below code? cursor = "-1" followerIds = [] while cursor != 0 do followers = Twitter.follower_ids("IDTOLOOKUP",{"cursor"=>cursor}) cursor = followers.next_cursor followerIds+= followers.ids sleep(2) end After the first iteration where cursor = -1, it gets assigned the nextcursor from the twitter api. However, when this is sent to the twitter API on subsequent iterations, I get the same response back as I did the first time.. with the same next_cursor. Any ideas what I'm doing wrong? I'm using the twitter gem.

    Read the article

  • Twitter Bootstrap Navbar blocking svg viewBox

    - by user1167650
    I have a navbar fixed to the bottom and I have page that has a title and a giant svg (created by d3.js). I would like the svg to take up the entire screen (whatever is left over), but it always seems to have some part appear behind the bottom nav bar. I've tried: 1) using viewBox to auto-resize, setting the parent div and the svg to be block elements 2) adding padding-bottom to the body element But the svg still appears behind the navbar on wide screen monitors.

    Read the article

  • Bootstrap inline button dropdown within <p> jumbotron

    - by C.B.
    Currently I have a jumbotron setup with some paragraph text, and I would like to stick a button dropdown inline with the text. Dropdown button <span class="btn-group"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> Button... <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="#">Opt 1</a></li> <li><a href="#">Opt 2</a></li> </ul> </span> Jumbotron <div class="jumbotron"> <h1>Hello!</h1> <p>Welcome</p> <p>Another paragraph <!-- dropdown is here --> </p> </div> <!-- jumbotron --> If the dropdown is within the <p> tag, it does not "dropdown" (but renders). If it is outside of the <p> tag it functions fine, but I would like it to be inline with the text and need the text to be in the <p> tag to get the style. Any ideas? Things to note -- If I replace the <span> tags with <div> tags, it will work fine within the <p> tags, but won't be inline.

    Read the article

  • Format form fields for bootstrap using rails+nokogiri

    - by user1116573
    I have the following in an initializer in a rails app that uses Twitter bootstrap so that it removes the div.field_with_errors that rails applies when validation fails on a field but also the initializer adds the help/validation text after the erroneous input field: require 'nokogiri' ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe form_fields = [ 'textarea', 'input', 'select' ] elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css("label, " + form_fields.join(', ')) elements.each do |e| if e.node_name.eql? 'label' html = %(#{e}).html_safe elsif form_fields.include? e.node_name if instance.error_message.kind_of?(Array) html = %(#{e}<span class="help-inline">&nbsp;#{instance.error_message.join(',')}</span>).html_safe else html = %(#{e}<span class="help-inline">&nbsp;#{instance.error_message}</span>).html_safe end end end html end This works fine but I also need to apply the .error class to the surrounding div.control-group for each error. My initializer currently gives the following output: <div class="control-group"> <label class="control-label" for="post_message">Message</label> <div class="controls"> <input id="post_message" name="post[message]" required="required" size="30" type="text" value="" /><span class="help-inline">&nbsp;can't be blank</span> </div> </div> but I need something adding to my initializer so that it adds the .error class to the div.control-group like so: <div class="control-group error"> <label class="control-label" for="post_message">Message</label> <div class="controls"> <input id="post_message" name="post[message]" required="required" size="30" type="text" value="" /><span class="help-inline">&nbsp;can't be blank</span> </div> </div> The solution will probably need to allow for the fact that each validation error could have more than one label and input that are all within the same div.control-group (eg radio buttons / checkboxes / 2 text fields side by side). I assume it needs some sort of e.at_xpath() to find the div.control-group parent and add the .error class to it but I'm not sure how to do this. Can anyone help? PS This may all be possible using the formtastic or simple_form gems but I'd rather just use my own html if possible. EDIT If I put e['class'] = 'foo' in the if e.node_name.eql? 'label' section then it applies the class to the label so I think I just need to find the parent tag of e and then apply an .error class to it but I can't figure out what the xpath would be to get from label to its div.control-group parent; no combination of dots, slashes or whatever seems to work but xpath isn't my strong point.

    Read the article

  • MetroTwit is a Sleek Native Twitter Client for Your Windows System

    - by Asian Angel
    Do you love the new Metro design and need a native Twitter desktop client for your Windows system too? Then you may want to have a look at MetroTwit. When you kick-start the MetroTwit exe file it will download the necessary .NET Framework components if you do not already have them installed. Once that is finished it will then download the MetroTwit installation files to ensure that you have the latest release. MetroTwit will automatically start once the setup process has finished. From there you can quickly modify the layout (i.e. visible columns, etc.), theme, and other UI features to make MetroTwit right at home on your system. UI features visible in the screenshot above: Top: Access the Settings in the center at the top of the window Bottom: Add Column, Lists, Refresh, Tweet Window, Search Twitter, User Profile, and Twitter Trends As you can see here the Settings are laid out nicely and very easy to navigate through. Features of MetroTwit: Drag and drop image support TwitLonger support for longer tweets Tweet breadcrumbs Infinite scrolling Auto-complete for user names and hashtags Themes and accents Resizable and reorderable columns What The Trend access URL shortening and previews Windows 7 Taskbar integration Quick-glance notifications Flawless high DPI support Note: Requires .NET Framework 4.0. Download MetroTwit [via DownloadSquad] Latest Features How-To Geek ETC What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) How To Remove People and Objects From Photographs In Photoshop MetroTwit is a Sleek Native Twitter Client for Your Windows System Make Efficient Use of Tab Bar Space by Customizing Tab Width in Firefox See the Geeky Work Done Behind the Scenes to Add Sounds to Movies [Video] Use a Crayon to Enhance Engraved Lettering on Electronics Adult Swim Brings Their Programming Lineup to iOS Devices Feel the Chill of the South Atlantic with the Antarctica Theme for Windows 7

    Read the article

  • Facebook and Twitter Shoes [Geek Fun]

    - by Gopinath
    For all the Facebook and Twitter enthusiasts, here are cool designs of Facebook and Twitter Shoes.   There are not real shoes and you can’t buy them anywhere. They are just dream visuals created by Mckay and he says in a blog post Facebook as a brand is increasingly on the rise and I thought it would be interesting to see what it would look like if Adidas also released a limited edition Facebook Superstar, so I worked on my own design of the shoe and this is what I came up with Would not it be cool if the social giants bring these shoe designs to reality? This article titled,Facebook and Twitter Shoes [Geek Fun], was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • Wow Twitter!!! Ten billions and counting

    - by samsudeen
    Twitter the micro blogging site crossed the ten billions milestone on 4th of this month as per the report by GigaTweet (Site which tracks the number of tweets posted on twitter) The person who sent the 10 billionth tweet is still unknown as his profile is protected. But the 9,999,999,999th tweet was sent by one Rafaela Marques from Brazil. AS you can see GigaTweet expects just another 196 days to reach the 20 billionth marks if tweet continues with the current pace. Some of the interesting statics about rate in which people tweeted every year 2007 – 5000 tweets per day 2008 – 300,000 tweets per day 2009 – 2.5 million per day It reached an average of 35 million tweets per day by end  2009. Today believe it or not the tweet rate is 50 million tweets per day and that’s why we call Wow Twitter!!! . Join us on Facebook to read all our stories right inside your Facebook news feed.

    Read the article

  • What can I do with the twitter API?

    - by aditya menon
    I've tried googling for this but could not find concrete developer examples. When building mundane daily web applications like Classified websites, Job boards or Intranet targeted Document Management Systems, how can the twitter API help me do more things. May I please have some examples on how developers have used twitter to make their apps better? Other than the obvious use for promotional and search engine optimization purpose (yay there's a new job post on our site), what can I do with it? Also, am I late to the party? I hear a lot of upset on the internet about how twitter is apparently slowly betraying developers (I don't understand the specifics), so should I even look at the system or consider alternatives?

    Read the article

  • Twitter @Anywhere oauth_bridge_code

    - by AngelCabo
    I'm having trouble with Twitter's implementation of an oauth_bridge_code for the @anywhere api. I've seen a few walkthrough's on how to use this functionality but I can't seem to get the request to work for me. I'm using Ruby on Rails with the oauth gem. My code is as follows: def callback consumer = OAuth::Consumer.new(APP_CONFIG['twitter_key'], APP_CONFIG['twitter_secret'], :site => "http://api.twitter.com", :request_token_path => "/oauth/request_token", :authorize_path => "/oauth/authorize", :access_token_path => "/oauth/access_token", :http_method => :post) request = OAuth::AccessToken.new consumer json = request.post("https://api.twitter.com/oauth/access_token?oauth_bridge_code=#{params[:oauth_bridge_code]}") end I keep getting 401 unauthorized responses from the signed post request even though this is supposed to be working according to this walkthrough: http://blog.abrah.am/2010/09/using-twitter-anywhere-bridge-codes.html and a presentation from Matt Harris on slideshare. Any ideas on what I'm doing wrong (besides possibly trying to hit functionality that may not be in place)? Greatly appreciated!

    Read the article

  • Twitter - Get users live tweets on my website instantly

    - by Gublooo
    Hello guys, I was checking out the stocktwits.com website. While signing up I provided them with my twitter username. Now whenever I tweet and if my tweet contains $ and a stock ticker symbol - it instantly appears on Stocktwits.com I am interested in implementing something similar in my website. Just wanted an understanding of how this would work. This is how I'm assuming it would work at a high level: 1) On my website - require users to provide their twitter usernames 2) Run a cron job every few minutes to pull the latest tweets for each of the usernames provided using something like http://twitter.com/statuses/user_timeline/username.xml I've tried Stocktwits and they updates are almost instantaneous - so it does not appear like they are checking for updates every few minutes. What are the best ways to implement this solution Thanks

    Read the article

  • Django Social Registration - Twitter Callback going to example.com

    - by user578888
    I have been working through installing django social registration on my webfaction account. So far I have the facebook login working. When I attempt to log in to to twitter I get the correct login page but after choosing "Allow" I am forwarded to the following URL: http://example.com/social/twitter/callback/.... where "example.com" is the actual URL it is forwarding to. I have setup the twitter app and have entered a valid oauth callback URL. I have searched the code on my developer machine for references to "example.com" but have not found any. Any help nailing this down will be greatly appreciated.

    Read the article

  • Twitter Authentication through Android's AccountManager classes.

    - by Robby Pond
    I am working on a twitter based app and am trying to incorporate Android's built-in Account support for Twitter. The following code works to popup the confirmation dialog for my app to access twitter but I am unsure of what to pass in as the authenticationType. Any help would be appreciated. I've googled all over the place and can't seem to find the correct answer. It goes in place of "oauth" below. AccountManager am = AccountManager.get(this); Account[] accts = am.getAccountsByType(TWITTER_ACCOUNT_TYPE); if(accts.length > 0) { Account acct = accts[0]; am.getAuthToken(acct, "oauth"/*what goes here*/, null, this, new AccountManagerCallback<Bundle>() { @Override public void run(AccountManagerFuture<Bundle> arg0) { try { Bundle b = arg0.getResult(); Log.e("TrendDroid", "THIS AUTHTOKEN: " + b.getString(AccountManager.KEY_AUTHTOKEN)); } catch (Exception e) { Log.e("TrendDroid", "EXCEPTION@AUTHTOKEN"); } }}, null); }

    Read the article

  • Ruby-on-rails: routing problem: controller action looks for show when it should look for finalize

    - by cbrulak
    background: trying to use the twitter gem for ruby-on-rails. in routes: map.resources :twitter_sessions map.finalize_twitter_sessions 'twitter_sessions/finalize', :controller => 'twitter_sessions', :action => 'finalize' (twitter_sessions is the controller for the twitter sessions in my app). The view has one file new.html.erb and is very simple: <% form_tag(twitter_sessions_path) do |f| %> <p><%= submit_tag "twitter!" %></p> <% end %> and the twitter_sessions_controller.rb: def new end def create oauth.set_callback_url(finalize_twitter_sessions_url) session['rtoken'] = oauth.request_token.token session['rsecret'] = oauth.request_token.secret redirect_to oauth.request_token.authorize_url end def destroy reset_session redirect_to new_session_path end def finalize oauth.authorize_from_request(session['rtoken'], session['rsecret'], params[:oauth_verifier]) profile = Twitter::Base.new(oauth).verify_credentials session['rtoken'] = session['rsecret'] = nil session[:atoken] = oauth.access_token.token session[:asecret] = oauth.access_token.secret sign_in(profile) redirect_back_or root_path end However, after I click the "twitter" button, I get this error: 401 Unauthorized .../gems/oauth-0.3.6/lib/oauth/consumer.rb:200:in `token_request' .../gems/oauth-0.3.6/lib/oauth/consumer.rb:128:in `get_request_token' .../gems/twitter-0.9.2/lib/twitter/oauth.rb:32:in `request_token' .../gems/twitter-0.9.2/lib/twitter/oauth.rb:25:in `set_callback_url' app/controllers/twitter_sessions_controller.rb:7:in `create' If I go to the finalize url, http://localhost:3000/twitter_sessions/finalize, directly, I get this error: Unknown action No action responded to show. Actions: create, destroy, finalize, isLoggedInToBeta, login_required, and new Any ideas? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >