SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 32 of 32
  1. #26
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Kingston
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I followed this article and found errors that others did as well. Here's my findings :-

    Check paths for required files. As @themasterbrewer said, they have an extra folder reference.

    After generating the pin and trying to validate it immediately afterwards, I realised the access_token and access_token_secret files were blank, resulting in the blank "Connected as @" issue, and no tweet sent. As @sgtquezada said, if this is also happening to u, check dev.twitter.com and u shud get these values from the application settings.

    No reason not to store these values in the php file that is going to auto-tweet for you rather than having them in separate files and reading them in with file_get_contents.

    Hope this helps someone.

  2. #27
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ,

    This is a great tutorial , I used it a while back, followed the instructions and was tweeting in a few minutes. The facebook app i used this with is still tweeting away like a champion.

    This evening I sat down to wire up a new app followed the instructions as before got through to twitter and got my pin number but this is where things stop working.

    The Validate.php no longer works for me. I have tried and tried, double checked and double checked. I cannot get the thing to validate the pin and create the two files.

    The timing between hitting the register and validate is less than 10 secs.

    I read through some of the comments and one person suggested using OAuth from PHP what a melt that was. So its prompted me to come back here and ask has Twitter changed anything recently that has broke this.

    Any feedback is welcomed

  3. #28
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I solved this a few minutes after posting thanks to the person who commented before me.

    It was not quite clear in your post up it lead me to resolving the issue.

    Twitter has indeed made some changes it seems you no longer need the pin

    If you browse to http://dev.twitter.com

    you should be able to find your registered app, if you click on your app name the page refreshes and on the right hand side you will see "My Access Token"

    In there you will find

    Access Token (oauth_token)
    dfdsfsdfdskfsdkjfkjdshf

    Access Token Secret (oauth_token_secret)
    dsfksdhfjksdhfjkhdsjkf

    These are the two files that would have been created using the pin, so all you need to do is grab these and include where you need in your file. Once i took these and added it to the test file , first try it tweeted out.

    Rocking again,

    Thanks for the tutorial and walk through with the original it was a great help. I hope this post helps someone else who walks in to the same situation as myself.

  4. #29
    SitePoint Zealot
    Join Date
    Jan 2002
    Location
    Launceston, Australia
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ole dawg View Post
    No reason not to store these values in the php file that is going to auto-tweet for you rather than having them in separate files and reading them in with file_get_contents.
    I would presume this is to keep those accesstoken values more secure, eg outside the public_html folder. If your php file that's going to tweet is already outside the public folder, then by all means, put those values straight in

    I had no trouble setting this up within a very short time, right through to getting the Hello World tweet. You do, of course, have to check the included file paths, but that should be common sense

    Thanks very much for the tutorial!

  5. #30
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in twitter (dev.twitter.com etc) you can get all the tokens for that account. That's how you do it in the twitter-app in word-press.

    Question:
    Is it good practice to store these tokens in a database, or is a secure place outside www-root better?

    Trond

  6. #31
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Raj,
    Thanks a lot!, this is really very very handy tutorial. it is still valid event after changing the Twitter ID format.

    but i have one question?? why we retrieve Access Token and Access Token Secret via register.php and validate.php, bcoz it is already there when we register new application.

  7. #32
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for this tutorial! I got the script working fairly easily. But now I want to modify it and display my latest tweets.

    On one of my sites I parse an RSS feed of my tweets with the php fopen function but on another site the same script fails (failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request ). I figure if I have an authorized request I should be able to get the tweets using http://api.twitter.com/version/statu...r_timeline.rss but I have no idea how to implement this and store it as a var which I can parse.

    Any help or likes to tutorials appreciated.

    I am aware of javascript solutions, but it needs to be PHP so Google bots read it as HTML content.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •