I almost always try to bring value to the group.. making a negative comment to her friend (the obstacle) will just make her try harder to keep you from being with her friend. Instead - try to become very friendly with the obstacle.
And Nick is right, that line will work in the exact right situation.
Using it out of context will not work.
Instead, use more of the "that's great you have a boyfriend, he must be really NICE" and just pile on how boring it must be to be settled down.