"Thanks for coming over and playing Great bass. I love you man peace and love," Starr wrote alongside a photo of him and McCartney in the studio.
Starr also tweeted a photo of him, McCartney and Eagles guitarist Joe Walsh, Starr's brother-in-law, from the same studio session. "And look out Joe W. came out to play what a day I'm having," Starr tweeted.
The recording session came just days after McCartney, Starr and Walsh, along with Tom Hanks and Dave Grohl, were all spotted dining together in Santa Monica, NME reported.
Starr is currently in the studio working on the follow-up to 2015's Postcards From Paradise. He and McCartney, who inducted Starr into the Rock and Roll Hall of Fame in 2015, last collaborated on the drummer's 2010 LP Y Not, with McCartney singing on "Walk With You" and providing bass on "Peace Dream."
In July 2016, Starr spoke to Rolling Stone about hitting the studio with artists like Van Dyke Parks, Richard Marx, Glen Ballard and Dave Stewart for his new LP.
"The way I've been working over the last several years is that I do sort of a rhythm-pattern synth track. And then I play drums and go, 'Oh, there's a verse. Oh, that sounds like a chorus,'" Starr said. "And then I call writers in and say, 'Let's write something to that!'"