humanodon is correct about publishing a book or chapbook; usually at the end there is a "notes" sort of section where the author can accredit the 1st publication. After publication, rights revert to the author. Unfortunately, "first publication rights" can be quite stringent; some magazines consider even posting the poem on a private Facebook account or blog (i.e., one you can't see without having a password or an invite of some sort) as "first publication." Of course, this does beg the question of "How would they be able to verify?" Some publications are a little more lenient and will say it can be published on Facebook, or if you have already put it up on a blog as long as you delete it you're okay. But it varies. Sometimes they are more specific and want, say "First North American publishing rights."