I am creating an application where the users connect their twitter account - store their access and secret token in DB. They are then presented with their tweets and can delete them.
I have used the Thujohn Twitter Package to get the user's tweets using their tokens. http://ift.tt/1K4ObA3
However, I cannot use this package to delete a specific tweet.
My question is - How can I use this package to delete a tweet?
My code in my controller to delete a tweet is as such
function deleteTweet () {
$user = Auth::user();
$accessToken = $user->twittertoken;
$accessSecret = $user->twittersecret;
$request_token = [
'token' => $accessToken,
'secret' => $accessSecret,
];
Twitter::reconfig($request_token);
$tweet_id = '777869567897038848';
$tweets = Twitter::post("status/destroy/$tweet_id.json");
var_dump($tweets);
}
I have filled the tweet id manually.
Thanks for your help
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2l2yeCT
via IFTTT
Aucun commentaire:
Enregistrer un commentaire