Need help with twitter oauth

Discussion in 'PHP' started by kevydesigns, Mar 26, 2012.

  1. #1
    Hi guys.

    I want a PHP script so that once executed it will automatically tweet a message on my twitter account.

    Here I followed this tutorial but want to expand on it by automatically authorizing me to tweet instead of having to manually click authroize everytime i login.

    http://tekxplorer.blogspot.com/2010/08/twitter-oauth-using-php-to-make-your.html


    So I've already signed up for twitter developer app and got the tokens.

    I made it work, but I have to manually authorize myself anyone know how to avoid the authentication bit so it posts once i execute the php script?



    Please help thanks.
     
    Solved! View solution.
    kevydesigns, Mar 26, 2012 IP
  2. kevydesigns

    kevydesigns Well-Known Member

    Messages:
    1,209
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    125
    #2
    So no one know how?
     
    kevydesigns, Mar 27, 2012 IP
  3. #3
    Hi,
    it's simple. Your app have to call this address: https://twitter.com/oauth/authenticate That gives forever authorization.


    There is also another way to solve ur problem. When ur app calls the twitter it gives it an access token and a secret token(every user have a different one), which are used every time you ask anything to the Twitter API. You just have to put them to database. When u know this tokens u can use them to call twitter api directly. It's simple.


    best regards,
    s.
     
    stasiek, Mar 27, 2012 IP
  4. kevydesigns

    kevydesigns Well-Known Member

    Messages:
    1,209
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    125
    #4
    Thanks stasiek.

    I got it to work now.
     
    kevydesigns, Mar 27, 2012 IP