I'm developing a mobile website for work that involves posting to Twitter. I needed a simple starting point to build upon and came across a website which had the perfect PHP code for working with. Trouble is, I can't get it to work.
Here is where I found the code: DiscussDesk - PHP Code to Post to Twitter
Here is a Demo of it working on their site: Demo of PHP Posting to Twitter
My knowledge of PHP is fairly rudimentary, and my knowledge of OAUTH is nil-to-none, however the implementation seems fairly straight forward. I can understand PHP fairly well.
I can't seem to get this code working however. I have set up the app in Twitter, added the access keys to the config file, and have been confused with the callback url. I have loaded the code to my own website at: http://twitter.chris-alexander.com so my first question it - would this URL I've loaded it to be the callback url? Would it be for both the Twitter App Dashboard and the php config file? I've seen other examples show something like: http://twitter.chris-alexander?source=twitter for one of them.
I've tried multiple iterations of the call back url like above, but maybe I'm missing something? The demo site that is above makes a call to Twitter and grabs the access tokens. You can see that the code works, but it seems I'm doing something wrong.
For convenience I have added the code to a repository at https://github.com/cmalexander/php-post-to-twitter/tree/master
Any help would be greatly appreciated!
Chris