Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8680687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:18:47+00:00 2026-06-12T21:18:47+00:00

I have an application wich has Oauth access using Twitter as provider. I also

  • 0

I have an application wich has Oauth access using Twitter as provider. I also have the ability to ask the logged user permisson to Read and Write in his/her account and once a user authorized the app, I can send tweets as the user with something like:

u = User.find(id)
u.twitter.update("Some-Status-Here")

in the rails console… What I want to do is to Tweet as all the users in one command, but if I try something like:

u = User.all
u.twitter.update("Some-Status-Here")

I get this error:

undefined method `twitter' for #<Array:0x00000002e2f188>

How can I tweet as all the users in one command? What am I doing wrong? I feel it is a very basic thing I’m missing… Can someone help me?

Thank You.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:18:49+00:00Added an answer on June 12, 2026 at 9:18 pm

    The User.all method returns an array of users, not a single user. If you want to call a method on each of the users you need to loop through it.

    users = User.all
    users.each do |user|
      user.twitter.update("Some status here")
    end
    

    That said, I don’t recommend updating a user’s Twitter status without first showing them the message and asking their consent.

    Also, there are likely more efficient ways to do this than the above, so keep an eye on performance and the API hit limit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a drive application wich changes the permissions so another user becomes the
I have an ASP.net MVC2 application. In wich I'm using JQuery to alter all
I have a WindowsForms application wich has SynchronizationContext.Current not null But from that WindowsForms
I have a Qt Dll wich I inject into a third-party Application using windows
i have a online application for wich i require a sort of dashboard (to
I have application with needs to have access to some sensitive data(in this case
I have application which needs to use a dll (also written by me) which
i have a privacy form, in wich i am selecting what application should be
I have a multiple web sits asp.net application. In this application different domains using
Hello guys i have an website online wich access the database. The database access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.