What's the API to undo retweets (unretweet) in Twitter? - twitter

What's the REST API call required to undo/remove/destroy/delete a retweet (of another user) from the authenticated user's timeline? There's simply no mention of this in the API documentation on the Twitter website.

Native retweet has all attributes of a simple tweet including a unique ID. So, you can use statuses/destroy method to remove it.
How to get that ID depends on your application. First, it's returned by statuses/retweet method. Second, you can get user's timeline and parse out ID of this tweet.

Related

Search any twitter users feed

Its been a while since i last used the twitter api, Using Javscript, I would like to be able to search any random twitter users feed.
On the page I would enter there Twitter username and the app would go and find the users data returned as JSON.
I'm not after the code, I would just like to know what is the best API to use for this?
Do I just need the REST API, I assume this:
https://dev.twitter.com/rest/public/search
Also, authentication do I need to authenticate my app? how should I do that if its needed?
thanks.
If you want all of my tweets (#edent) you will need to use the User Timeline API
For example:
https://dev.twitter.com/rest/reference/get/statuses/user_timeline?screen_name=edent
Yes, you will need your app to be authenticated. You will need to use OAuth

Is it possible to retrieve the _whole_ friendlist of a user using the iOS Facebook SDK?

I am reading through the docs and other questions on Stackoverflow. Am I getting this right that it is actually impossible to retrieve the whole friendlist of the user? The permissions user_friends only refers to friends that have previously logged into the same app with Facebook.
I am wondering if I just oversee the solution or if it is indeed impossible to get access to a user's friends because there is no API that would allow to do so?
Since graph API v2.0, this is no longer possible:
See
https://developers.facebook.com/docs/graph-api/reference/v2.2/user/friends#readperms
This will only return any friends who have used (via Facebook Login) the app making the request.
https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
In v2.0, the friends API endpoint returns the list of a person's friends who are also using your app. In v1.0, the response included all of a person's friends.
As Tobi says, in V2.0 this is no longer possible.
But, if you want to get only name and profile picture, then its possible!
Check taggable_friends
Note that The id that returns this API call isn't unique, it may change for every request for same user, so you can't use that field to identify user, you can use it ONLY for tagging.

Is it possible to access all Tweets from a user using the Twitter API?

The Twitter REST API 1.1 documentation for the GET statuses/user_timeline method states:
This method can only return up to 3,200 of a user's most recent Tweets. Native retweets of other statuses by the user is included in this total, regardless of whether include_rts is set to false when requesting this resource.
Does this mean one can only traverse the 3,200 newest tweets form a user's timeline?
Does this mean one can only traverse the 3,200 newest tweets form a user's timeline?
Yes, though nothing is stopping you from caching tweets yourself.

Knowing if an account had tweeted

Background info:
My website has an account system and we wanted to give the accounts "reward points" everytime they tweeted / facebook share.
For facebook share, we are able to track which account had shared by using the redirect_uri and redirect them back to our site (with the specified url) and noting it. https://developers.facebook.com/docs/reference/dialogs/feed/
Is there such thing on twitter as well? I had been trying to find real hard but i can't find a way for me to inform my system that a certain account had tweeted.
Thanks!
One of the basic objects in the Twitter API is the User object, which gives you a decent amount of information about the user in question. Once of the properties of the User object is called "status", which is a Tweet object, which is the user's most recent tweet.
So, in your application, you could store the unique identifier and date/time of the user's last tweet. Then at an interval of your choosing, you could get the information about the user and see if the ID of their most recent tweet matches what you have in your database. If it does not match, then the user has posted a new tweet.
Twitter API documentation of the User object
Twitter API documenation of the Tweet object

find tweets mentioning any arbitrary twitter user

For statuses/mentions, I need to authenticate as a user. I want to see the user's mentions without asking him/her to authenticate. If the tweets are public, what are the mentions not public ?
I'm writing to do this
Check the Twitter search API
https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html
To find all user mentions: just use #username as search term.
I would like to add that Twitter's Search API returns only tweets from past 7 days. So if you want to retrieve ALL tweets mentioning an arbitrary user, you can't.If anyone finds a way to do this, please mention.
There is no way to get a user's mentions using the statuses/mentions endpoint because this is possible using the search api.
http://dev.twitter.com/doc/get/search

Resources