RemoteTweet: A secure and easy way to integrate Twitter using PHP

Discussion in 'PHP' started by Sam Designs, Sep 7, 2009.

  1. #1
    I have just released my RemoteTweet class on my website www.remotetweet.com

    I don't think I have much to say on here as the website says it all really. This is my first class I have released, so maybe you could give me some tips on how to advertise?

    Thanks,
    Sam.
     
    Sam Designs, Sep 7, 2009 IP
  2. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #2
    You can submit it to phpclasses.org.
     
    ThePHPMaster, Sep 7, 2009 IP
  3. Sam Designs

    Sam Designs Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Thanks for the advice, I've just submitted it. Hopefully this will get it recognized.
     
    Sam Designs, Sep 7, 2009 IP
  4. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Also submit to hotscripts.com php.resourceindex.com etc.
     
    hamidof, Sep 7, 2009 IP
  5. Sam Designs

    Sam Designs Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Thanks for the tip guys, my submissions are all pending at the suggested websites!

    Any comments on the script itself?
     
    Sam Designs, Sep 8, 2009 IP
  6. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The only questionable thing is the ob_start() and session_start() on top of your class...
     
    hamidof, Sep 10, 2009 IP
  7. Sam Designs

    Sam Designs Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Why is that questionable? The class uses sessions to store the oAuth tokens, and ob_start() is to stop header cache errors.
     
    Sam Designs, Sep 10, 2009 IP
  8. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I just think it's doing too much this way, why would it try fixing header cache errors? Does it write anything using echo etc.?
     
    hamidof, Sep 10, 2009 IP
  9. Sam Designs

    Sam Designs Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #9
    Why on earth is it doing too much? Do you have a problem with it stopping errors?
     
    Sam Designs, Sep 10, 2009 IP
  10. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #10
    That's fine, I didn't mean to offend you, you asked and I thought you wanted to hear what I thought, so that's what I think...

    I think the main script that is calling the class should do all these things.

    Good Luck :)
     
    hamidof, Sep 10, 2009 IP
  11. Sam Designs

    Sam Designs Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #11
    It's personal preference really, it means for easier installation and usage if the class can do as much as possible. That's what I really want from RemoteTweet. Ease for others and myself to program twitter applications.
     
    Sam Designs, Sep 10, 2009 IP
  12. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #12
    You call ob_start() where is ob_end_clean()?
     
    hamidof, Sep 10, 2009 IP
  13. Sam Designs

    Sam Designs Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #13
    I never knew ob_end_clean() was necessary?
     
    Sam Designs, Sep 10, 2009 IP
  14. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Ok, no offense I just want to help you but...

    Most of the people who want to use something like your class develop communities and want to give their users these abilities and your class doesn't do the job right because I'm not going to make a config.php for every single user. User and pass must be determined at run-time.

    If you think someone is going to use your class to use twitter for herself/himself, that's wrong because people will simply use Twitter itself.

    Also including your class means that you mess up my output buffering by calling ob_start and not releasing it and also calling session_start() which I have probably done already.

    With all that said, I don't think anyone serious is going to use your class because it has fundamental design issues and they start with config.php which then are followed by session_start and ob_start naturally.

    You are a good programmer though but architecture is tricky and takes time to master. I'm not a master either...

    :)
     
    hamidof, Sep 10, 2009 IP
  15. Sam Designs

    Sam Designs Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #15
    You obviously don't understand the config.php part of the class. That's for the application itself, that does not include usernames or passwords; in that file are the keys which allows the application to use Twitter's API for login.

    I see what you're saying about session_start(), are you suggesting I should put it in the usage guide? Also, I'm sure if someone wanted to use my class enough, they'd make their own modifications to suit their style.

    However, next time, please review my code before you start making assumptions...
     
    Last edited: Sep 11, 2009
    Sam Designs, Sep 11, 2009 IP