Reputation: 1106
How can I remove the ?code=[...]
parameter that is in my website's URL after logging in ? I am using the Facebook PHP SDK.
Upvotes: 0
Views: 526
Reputation: 29874
The code parameter is required in the oauth 2.0 log in flow. It is part of the login protocol.
It appears that you already successfully employ that protocol, so I don't need to tell you about that.
However to answer your question. After the url with the parameter has been called by the client and you performed the log in (set session variable, cookie etc., just issue a header redirect.
You flagged your question as php
so this would be something like
header("Location: /where-you-want-your-client');
If you have the login flow implemented in javascript you can do that with:
window.location.href = "http://yoursite.com/where-you-want-your-client";
Thats it :)
Upvotes: 1