"MY BOYFRIEND'S BACK!" Smith captioned the photos, which also included actor Jason Mewes.
In a lengthy post accompanying the images Friday, Smith explained how happy he is that he asked Affleck to be in his latest big-screen comedy, Jay and Silent Bob Reboot.
Although the collaborators had been estranged for about a decade, Smith was encouraged to reach out to Affleck -- someone Smith said he "missed terribly" -- after Affleck said in a TV interview he was willing to work with Smith again.
Affleck reprises his role of Holden McNeil, a comic-book creator and friend to the titular slacker heroes, in Reboot.
Affleck previously played the character in 2001's Jay and Silent Bob Strike Back and 1997's Chasing Amy.
"His scene is one of the best bits of cinema I've ever been involved with: it's absolutely magical and life-affirming and all the things I really care about now, post-heart attack," Smith wrote about Reboot. "Not only did we score an amazing scene for the flick, but I also got my friend back -- all because of entertainment journalism."