A. This photo has been taken in Okinawa
B. This photo was taken in Okinawa
Which one would be correct? In the case that if I don't want to specify a date
Both are correct, but Version B is probably the one you want to say.
Version A might be preferred as a lead-in statement in certain contexts. For example, if I was showing you a picture of a famous building or vista in Okinawa, I might say something like:
This photo has been taken in Okinawa hundreds of times.
(meaning, not that exact photo, but many photos very similar to it).
"It was" is the correct past tense form, indicating an action that takes place completely in the past.
To contrast, "it has been" is a present perfect tense, indicating something that began in the past but continues now.