Search any twitter users feed - twitter

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

Related

Showing all posts from a Twitter user

Using Twitter's API is it possible to write an application to show all the posts from a particular user when you don't know the Twitter password for that user?
If the posts/tweets are not protected, yes. You need the Twitter user_id or screen_name.
Check this API

Can I get a list of users who have authorized my Twitter app?

I'm trying to get a list of users who have authorized my Twitter application. I've tried checking the API docs, but there seems to be no twitter application specific APIs that I can find. I'm trying to avoid having to store these twitter user names myself, since the user list would be the exact same as Twitter's authorized user list and even handle deauthorized users for me.
No, there's no way to obtain this information from the Twitter API. If you're interested in keeping track of the users who are using your application, you'll need to track it yourself.

Showing Tweets of a User in his account on mywebsite once he has allowed my website to his twitter account?

In my webapp I want to show the recent tweets of a logged-in user.
I've connected user's twitter account to my application using Omniauth and have stored the auth token and secret in the database for the future use.
So I want, as a user logged in to mywebapp, that I can use the stored Auth token and secret of that user and show him his recent tweets in an iframe (like how the facebook social plugin provides their own interface and views for their recent activities, etc.)
I have also gone through the twitter gem, but I just get the data from that site; I need the same layout and view like twitter by using the iframe and twitter plugin.
Is there any way to do that with Rails app?
Any help will be appreciated.
Thanks
You can use the Twitter plugin, but change the script include. Instead of using the Twitter-provided widget.js, you'll use your own javascript file. Your own javascript file will be identical to widget.js except the REST call to user_timeline will include the oauth token and secret as parameters.
See https://dev.twitter.com/docs/auth/oauth#Making_a_resource_request_on_a_user-s_behalf
If you already have the data from twitter in text format, it is trivial to write your own view that uses this data from the Rails controller. you can render that view as a static webpage.
If you would like to do the same as an iframe, you may have to do the data fetching via javascript. you may use the Twitter javascript plugin and modify the call to the user's timeline to include his/her access token.

How to download Facebook page posts

I am an iOS developer and I am writing an app which needs to take statuses from my Facebook page and and display them in my app.
Does the Facebook API support that?
If it does, can anyone give a link for some tutorials or explain how can I make this?
I know that API supports an RSS feed but i don't found how to feed my statuses.
If you're using a Facebook page, you can easily use the graph API to query for posts made by that page. For example, for Starbucks:
http://graph.facebook.com/Starbucks/posts
You can simply load this in your browser to see the format the data comes back in, and all that's needed to access this data is a simple HTTP request. You can replace Starbucks with your Page's ID or username to get your Page's posts. These come back in JSON, which should be fairly easy to handle on your end.
Yes, the Facebook Graph API allows you to access your profile and extract any information you'd like from it.

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