Twitter API Get Post ID

Discussion in 'PHP' started by scottlpool2003, Nov 15, 2013.

  1. #1
    I have an auto poster to tweet news stories as they are added, but need to know how to get the ID of the post just submitted so I can use it to delete the post when the correlated story is deleted. Any ideas?
     
    scottlpool2003, Nov 15, 2013 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    I'm not entirely sure why - think of it this way (depending on how long the posts usually stays up):
    1. why delete the newsposts at all? Just toss them in an archive-category or something similar (without changing the url)
    2. why do you have to delete tweets even IF you delete the posts? Mostly, people won't look very far back on a Twitter-feed. Especially when it comes to auto-posts.
     
    PoPSiCLe, Nov 22, 2013 IP
  3. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #3
    There's a few reasons... sometimes news stories get updated, posted accidentally, mistakes etc. If there's an inaccuracy in a news story, it's fairly important to make sure it's deleted from Twitter for integrity reasons.
     
    scottlpool2003, Nov 22, 2013 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Well, you could probably import the Twitter-feed, and filter on either a post-id or link or something similar, and figure out which tweet to delete - however, I'm not sure how you remotely delete a tweet -for that you'll need to look at the Twitter API.
     
    PoPSiCLe, Nov 22, 2013 IP
  5. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #5
    I'm using the API to post the tweet, just need to figure out how to get the ID of that tweet using the API.
     
    scottlpool2003, Nov 22, 2013 IP
  6. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470