EDITED: I have the code below. Essentially, it is grabbing an image from a data frame for a function. I couldn't quite figure out what is the best way to do a for loop or if there is a better option for this. The end goal is to arrive at DF_ALL. The data frame has over 100s of images. So, the solution below is not the most elegant.
# Part 1, Get some profile images from Twitter.
library(rtweet) #I'm not including the key here.
# Get a list of IDs
followers <- get_followers("TWITTER_HANDLE_HERE", n = 10)
# Get the complete Twitter profile for the 10 users
follower_profiles <- lookup_users(followers)
# Create new variable profile_full_url for image API
follower_profiles$profile_full_url <- gsub("normal", "400x400", follower_profiles$profile_image_url)
# Part 2, Proceed image with API
library(Roxford)
visionkey = 'KEY_FROM_GOOGLE'
# Run image tag function on the first image
DF1 <- getTaggingResponseURL(follower_profiles$profile_full_url[1], visionkey)
DF1$twitter_url <- follower_profiles$profile_full_url[1]
# Here is the result (Notice how it is show 3 rows. I don't why it is. Would prefer to have 1 row per image)
# name confidence width height format twitter_url
# tags wall 0.999090671539307 <NA> <NA> <NA> http://pbs.twimg.com/profile_images/9999999999_400x400.jpg
# requestId <NA> <NA> <NA> <NA> <NA> http://pbs.twimg.com/profile_images/9999999999_400x400.jpg
# metadata <NA> <NA> 400 400 Jpeg http://pbs.twimg.com/profile_images/9999999999_400x400.jpg
# The problem is... there could be 100+ of images.
# I feel that a for loop could potentially be the solution.
DF1 <- getTaggingResponseURL(follower_profiles$profile_full_url[1], visionkey)
DF1$twitter_url <- follower_profiles$profile_full_url[1]
DF2 <- getTaggingResponseURL(follower_profiles$profile_full_url[2], visionkey)
DF2$twitter_url <- follower_profiles$profile_full_url[2]
DF3 <- getTaggingResponseURL(follower_profiles$profile_full_url[3], visionkey)
DF3$twitter_url <- follower_profiles$profile_full_url[3]
DF_ALL<-rbind(DF1,DF2,DF3)