I’m trying to assign the boolean value from a Twitter user’s attribute (i.e. ‘verified’) to a variable, but I”m not having much luck. I’m using Ruby — here’s the code:
profile = Twitter.users({"Oprah" => :verified})
if profile == true
puts "This profile is verfied."
else
puts "This profile is NOT verified."
end
It always defaults to the else statement regardless of whether or not the Twitter user has been verified or not. I know I’m forgetting to do something simple. Any thoughts?
Try this
user
Twitter.userfor single user, andTwitter.usersfor many users