halpsb
halpsb

Reputation: 1106

Removing the 'code' parameter from URL - Facebook connect PHP

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

Answers (1)

The Surrican
The Surrican

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

Related Questions