I have a text as follows:
오랜만에 고등학교 때 단짝이었던 친구를 만났다. 이런저런 이야기를 하던 중 그 친구는 나에게 볼 만한 사진 전시회가 있다며 같이 가 보지 않겠냐고 물었다
What does "다며" mean in this text
며 is used a connector between the two clauses. Similar to 'while' but also similar to 'and'. It is sometimes seen as the shorter version of 면서.
Normally you'd use 며 when the two clauses are not simultaneous or if they two clauses are not directly related, otherwise you'd use 면서. The 다 is just a way of showing that it is reported speech i.e. __다고 --> it is the 다 from this.
친구는 나에게 볼 만한 사진 전시회가 있다며 같이 가 보지 않겠냐고 물었다. --> (My friend told me there is an exihibition worth seeing), and (asked me if I wanted to go).
다며 is an abbreviation of 다면서, which has two potential meanings. In your sentence it is used to mean "while (saying)", which is a bit unusual because it's not commonly abbreviated when used to mean "while". The second meaning in which it is commonly abbreviated is basically "(I thought) you said ____". For example: "오늘 피자 먹는다며" - "I thought you said you were eating pizza today."