API limitation Twitter - java

I'm new to API programming and I need some help.
I have a JAVA application that needs to use twitter API to send a request and get the response for specific data.
For example sending tweet ID and get video or image URL.
My question is that assuming the app will be used by 10,000 people daily with 1 Key for the API call, will there be any problem for my application to send and get the request from Twitter API?
I saw online that there are some limits for APIs calls, for example, your API key can't call more than 100 times daily, if so how it will work for my application if I have 1 key that will be used by 10,000 people from different location and countries.
Thanks in advance.

Related

o.auth2 ERROR : Trying to fetch an Analytics report with Youtube API

I am currently working on a Java app to calculate a certain index. I need to feed it data from Youtube such as views, average minute watched, geography, etc. from a channel which I am now set as "owner".
I am trying to connect the app using Youtube Analytics API but get this error every time :
com.google.api.client.auth.oauth2.TokenResponseException: 401
Unauthorized
The code I am using is from google developer GitHub so I assume the error is not in the code.
I went back to the online console to try my credentials, and they don't work. I have generated and deleted so many Keys and clients but nothing seems to work. Note that I am able to trigger requests like search which don't require authentification. So the problem is precisely in the auth, but I can't see what it is.
Thanks!

Uploading Videos/mp4 to twitter using Java Application

I have succesfully posted images and messages in java application to twitter using twitter4j.jar by refering this link http://javapapers.com/core-java/post-to-twitter-using-java/ , now i am tring to upload video/mp4/chunk to twiiter.
I googled about this topic and found many answers-
Some posts says its not possible yet ,some say its possible through rest API ,some with twitvid API ,some with tweetinvi (http://tweetinvi.codeplex.com/discussions/640413)
My questions are:
1.) Is it possible to upload video to twiter?
2.) If yes,is it possible only through Rest API or(is it possible using twitter.media support jar in twitter4j).
Any suggestion, answer, post regarding this are welcomed and thanked.
I am the developer of Tweetinvi and I can confirm that it is possible to upload a video in chunks with the upload api.
I do not know about Twitter4J apart for its name but you can do an upload by using multi-part webrequests divivded by chunks of up to 5MB.
You can read more about it here : dev.twitter.com/rest/public/uploading-media
The process is the following :
INIT (inform twitter that you want to upload a video/image
APPEND the binary (x times up to 15MB)
FINALIZE you query
In each of the steps, Twitter will return the media_id in the JSON. After the finalize you can use this media_id for 1 hour and use it as part of a tweet publication.
Cheers,
Linvi
I created a pull request to add this feature in twitter4j. You can look at the implementation here: Adding Chuncked, video upload. This supports async upload of large videos 512mb and 140 sec.

Periodic posting to multiple twitter accounts using Java

I want to periodically post set of tweets to multiple twitter accounts. To accomplish this task, I have used tweetdeck.twitter.com, had created a twitter account and added all the other accounts that I need to post on under my account.
I have created a Java application using twitter4j library that connects to my twitter account and posts on my timeline.
How can I extend the use of this application to get the other accounts and post for them using twitter4j APIs?
I know it's too late to answer but it may aid other users, I recently encountered this situation, and I've used below approach :-
Store all twitter credentials(I prefer calling them handler details) and tweets in DB
Maintain a relationship between tweet and the handler over which it need to be posted.
Create a scheduler to pick up scheduled tweet and then pick the linked/appropriate handler and simply tweet.
Hope this help.

How can I capture hashtags on Twitter using Java?

Using the Twitter Java API, how can I listen for all tweets containing an arbitrary hashtag like "#Yosemite" or "#Scubadiving"? I know twitter exposes an Atom API over http, but we don't want to poll for data, we want to be notified in real-time when the hashtags are used in tweets.
Twitter does in fact offer a push APi to listen to hashtags. It's called the Twitter Streaming API. Your currently able to listen to 400 keywords and hashtags in this case.
Edit: integrate streaming API with Java
http://awalkingcity.com/blog/2009/06/22/using-java-with-the-twitter-streaming-api/
I'm willing to bet that Twitter does not expose a 'push' model for search results. I've seen several pieces of client software that make it look like you're getting real-time search results, but they're really just polling at allowed rates through the search API.

Update datastore in Google App Engine from the iPhone

I'm working on an app that communicates with Google App Engine to update and retrieve user information, but I can't think of a way to modify elements in the datastore.
For example, every user for my app is represented by a User object in the datastore. If this user inputs things like email, phone number, etc into fields inside the iPhone application, I want to be able to update those objects in the datastore. The datastore can be in Java or Python, I'm just looking for an idea that will work.
Thanks
Why not have the iPhone application communicate this information to app engine by making a simple HTTP request?
Specifically, I would do an HTTP POST to the server and include the relevant fields. Then your app engine request handler would simply store the information in the datastore.

Categories