Question about twitter api - api

I want to create a simple Twitter application, but I have a problem. I want to show the user information about his followers, but this requires one API request to get a list of all user IDs following him, and then many additional API requests to get the user information corresponding to the user IDs that were just fetched. Is it possible to get user info for many followers in one request?

Use the Followers method:
http://api.twitter.com/1/statuses/followers.xml (Twitter API Documenation)
It returns detailed information about each follower.

Related

Using Instagram's Graph API, how can I retrieve post data (media url, caption, poster username, etc)

I want to use Instagram's Graph API on my backend server to retrieve data about an Instagram post. On my frontend, users will submit a post URL (like https://www.instagram.com/p/CAvPIm2lszQ/). Then on my backend, I want to take the ID of the post from that URL (so in this case CAvPIm2lszQ) and then I'm hoping that I can pass that ID thru the Instagram Graph API and then retrieve the data that I need (media URL, caption, poster username, etc.).
So would that be possible? I did find documentation on "IG Media" for the Graph API, but under permissions, it says, "A Facebook User access token from a User who created the IG Media object, with the following permissions.."
Unless I'm misunderstanding it, I'm not sure if I'll be able to access posts from various public accounts. I think it's also worth mentioning that my users are not logging into their Instagram accounts to use my service so the only possible "User access token" would be my own.
Any ideas on how I can go about this? I was using the instagram.com/p/{post_id}/?__a=1 endpoint to meet my needs before but it doesn't work on my production server for some reason. So I'm kinda stuck.
Most probably you will not be able to achieve that using Instagram API. First of all the ID you are referring to CAvPIm2lszQ is not the ID that you will use for getting IG Media. The ID is different (it's numeric value like in the sample request from the page you've linked). The full URL that includes CAvPIm2lszQ is in the shortcode field.
At the moment it is not possible to look for the post detail using shortcode. If you want to use that endpoint you need to get the real post ID first, for instance by listing list of posts from given user.
But in order to do so - you need to use Facebook login authorization window to get token from given user. Alternatively you can try to request https://developers.facebook.com/docs/instagram-api/guides/business-discovery but it requires going through App review and having your own company to pass the Business Verification. Keep in mind that this endpoint returns information only about Instagram Professional accounts (Business/Creator account). You will not be able to get information about regular accounts.
And the last thing about ?__a=1 endpoint. This is not the official Instagram API. They use it only for their own purposes. Most probably your server IP address has been blocked due to sending too many requests.

User Tweets Stream Twitter

Twitter API has the GET method that return specific user tweets,
I want to create stream by specific user, but in Twitter Stream API there no method that can help me.
GET Sites in Beta now, I haven't got access to it
Any Idea how to create live update/stream with specific twitter user ?
You have 2 solutions. If you are able to get the credentials from the user (user accepting your app), then you can use the UserStream.
If you do not have access to this, you will have to use the FilterStream.
This one is a bit more restrictive as you cannot run more than 2 FilteredStream from the same ip or with the same credentials. In addition to this, a FilteredStream is limited to 5000 users as described on the twitter doc.
The default access level allows up to 400 track keywords, 5,000 follow userids and 25 0.1-360 degree location boxes.
I believe the solution to this problem is to use follow IDs within your stream and then check that the tweet->user->id for each tweet is within the list of follow IDs. That way you know that the post is original and not being retweeted etc. It does seem bizarre that twitter doesn't allow you to filter only messages "from".
I also believe that retweets have an 'retweeted_status' element in the result which if absent also shows its a new tweet from your following User IDs.

Instagram API - Is it possible to search for a users hashtag posts

Is it possible to search all posts with a specific hashtag by a certain user?
I am new to development and I am trying out Instagram's API if I can search such combination.
It is possible, but not using only a single request to Instagram's API. There are two solutions:
Search for posts by given hashtag's name using GET /tags/{tag-name}/media/recent request and then manually check every post if its user is the user you want.
Search for posts by specific user using GET /users/{user-id}/media/recent request and then manually check every post if its tags array contains the specific hashtag you want.
I would recommend to choose the solution in which you can expect less results (posts) to filter. In most cases it means the second one, because there is more posts on Instagram with a specific hashtag than an average user share on its Instagram's accout.
You can test Instagram's API requests with Instagram's API Console: http://instagram.com/developer/api-console/

Where is the api for retrieving user joined communities in Google+?

I'm creating a tool for a person to login into their google+ account and to lists all communities they were created or joined. I had googling around for a day and read google+ api references, but I couldn't find any information on:
Url of the API for accessing user's created or joined comminities,
Request parameters to perform such query
My tool has already succeed to perform oauth login and get access_token and ready to make any API call, But now I'm stuck trying to find the right Url and requirements to perform the API call as I wanted.
Please help
There currently is no API method to do this. If you would like to see such a feature added, you can star this feature request.

Foursquare Checkins API

What are the informations from a user that are avaible, by default, for users that are not his "friend"s ?
Can i have the list of "checkins" from any Foursquare user only by making API requests ?
What kind of information about a user i can fetch, without having him as my friend (friend of the account used to perform the API requests) on foursquare ?
On linkedin, for example, i could fetch his Company, but if the user used to perform the API requests had this user as a friend, i could fetch the whole "company history" . Is there any restriction like this one on foursquare ?
Thanks in advance
You can try this out yourself at the API Explorer to see: https://developer.foursquare.com/docs/explore#req=users/1234
As you can see, even if you're not friends with this user, you can see their name, friends' names, contact info (Twitter/Facebook), and checkin counts, but not the actual checkins themselves. You will need to be friends with this user to see their checkin history.
Note that if you make this request without authentication (e.g., https://api.foursquare.com/v2/users/1234 with no oauth_token ) then you can't see any information about them.