I have created a game app where I share some details to Facebook through a button called Share. When I finish the game it asks for the name in a dialog box, it shows no problem
An activity is restarted when the orientation changes. I'm guessing your code isn't saving needed information before this restart occurs. You can stop this default behavior by handling specific configuration changes yourself (ie: orientation change). A good tutorial on doing this is located here: Handling Runtime Changes