I’ve been reading 10 threads talking about similar topics, and everyone seems to find a solution - except for me.
Here is what I am trying to achieve: let my website users give me permission to access their Twitter account so I could post on their behalf with a three-legged oAuth.
I am using the “ohmy-auth” library (https://github.com/sudocode/ohmy-auth/blob/master/examples/twitter.php)
Here is my problem:
->set(array( 'key' => 'your consumer key', 'secret' => 'your consumer secret', 'callback' => 'your callback url' ))
If I set “callback” to nothing, it fails.
If I set “callback” to “oob”, it works but requires a PIN, which isn’t what I want.
If I set “callback” to any domain (I’ve tried hundreds, with / without http://, with / without www), it fails
If I set “callback” to a “non-domain” (example: “callback.php”) it works but obviously redirects to “https://api.twitter.com/oauth/callback.php?oauth_token=” which doesn’t exist.
As suggested by other threads, I have already filled the “Callback URL” in the App Management Form (https://apps.twitter.com/app) but it did not solve the problem.
“Enable Callback Locking” is NOT checked.
“Allow this application to be used to Sign in with Twitter” is checked.
If I click “Test Oauth” it sends to a “Denied access” page.
Few examples of what I have tried already and did not work:
‘callback’ => ‘example.com’
‘callback’ => ‘http://www.example.com’
‘callback’ => ‘http://www.example.com/callback.php’
‘callback’ => urlencode (‘http://www.example.com/callback.php’)
all of these lead to “https://api.twitter.com/oauth/authorize?oauth_token=”
Any idea what I am doing wrong here?
Thanks in advance!