SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Problem displaying twitter feed, based on sitepoint code

    I set up a page to display tweets for a client, based on the code in Craig Buckler's article - http://www.sitepoint.com/create-your...tter-widget-3/

    Now after running happily for over 18 months, it's stopped working. Don't know when it stopped, I only check their pages occasionally.

    Anyone else who has used Craig's code having this problem? Anyone got a solution?

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2012
    Location
    Scarborough, North Yorkshire, United Kingdom
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe Twitter have pulled the RSS support. The code calls (for example): https://twitter.com/statuses/user_ti...richaskew.json

    This is no longer available. Someone who knows more about it than me can explain how to achieve it but I think you have to give permission to the app your building to use the feeds.
    Richard
    Resell SSL Certificates - API / WHMCS / HostBill / ClientExec
    ServerTastic - RapidSSL, Geotrust, Thawte, Symantec, SmarterTools and more

  3. #3
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    The API endpoint has changed, it's now located at https://api.twitter.com/1/statuses/u...name=richaskew

    The data structure may have changed too, so you may want check the returned data.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  4. #4
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've tried editing the API line in the original code to match the link above, but it still doesn't want to play. The changes in that line where obvious, even to me.

    Pity that Craig said there was no support with the code which he wrote. I could find the items he extracts in the string that is returned in the link given above, no obvious change of name for the parts either.

  5. #5
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I created a test environment, and I got it to work by removing the cache files then changing line 144 in twitterstatus.php to:

    Code:
    CURLOPT_URL => 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $this->ID . '&count=' . $this->Count,
    FWIW, Craig states on line 10 of that same file "This code can be used without any restrictions, but please don't expect support either!".
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  6. #6
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Anthony!

    I've been out all day and just seen this. I'd edited the same line almost the same way, but didn't touch the cache. I added the /1/, which I'd somehow missed when looking at your original post, cleared the cache, and it worked.


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
  •