I implement the facebook during my wordpress website and things are working ok except one situation.

Basically logout from facebook, after which I click logout in website, I recieve the mistake:

Facebook.logout() known as with no access token.

And So I replace the logout code with this particular:

return javascript:if(Facebook.getAccessToken())Facebook.logout(function())else"

(This really is completed in a wordpress hook, to ensure that I'm able to possess the wordpress logout url)

However, after i click logout in cases like this I recieve a js error:

Unsafe JavaScript make an effort to access frame...

How do i have the ability to logout securely from facebook and wordpress. Facebook.Logout does not come with an error callback and does not throw any js error, therefore it is hard to make sure that situation.