I created a facebook application and send request to a user through below code.Now when a user allow my application then i need his id and email address into my canvas url.B
I am not familiar with php to comment on the code above. However in general it would be better to use javascript sdk for login alone (faced the same issue in asp.net). That way post user login, the control comes back to the same page where it was initiated. For example: