I want to be able to post on users Twitter feed from a Facebook app i'm developing at the moment but seem to be having trouble. When I call my the tmhOAuth PHP script to authenticate ask for permissions on Twitter I get the following error:
Refused to display document because display forbidden by X-Frame-Options
TmhOAuth works perfectly when its called directly from the browser. Its the header function that fails inside the Facebook iframe.
Any idea whats going on?
Twitter doesn't allow their OAuth authorization page to be contained within a frame, for phishing reasons. You need to open the OAuth flow in a new window, outside of Facebook's canvas.