How to change twitter pfp via requests - twitter

I would like to change twitter pfp via requests but NOT BY API
there is one parametr that describe whole image to upload:
and I dont understand where it takes place, maybe someone have already tried to do this and figured out?
Thank you in advance

The media_id parameter is returned from the media upload API endpoint. You will need to use the Twitter API to accomplish this.

Related

Endpoint nodes list in Kaa

I want to get list of endpoints in Kaa, I see many REST functions here but all of them need informations like Endpoint Hash Key and ... but I don't know how I can find them. Anybody can help me how I can do this ? and is there a way for geting event on device discovery in Kaa ?
Thanks in advance
On your link for each Rest call, there is the description with the endpoint cresponding to the request. For example:
Get user authentication status
URL : /kaaAdmin/rest/api/auth/checkAuth
Same for parameter needed.
If that's not what you are looking for, you might have to explain a little bit more.
You are able to get endpoint key hash in 3 ways :
Get information from Client SDK on your device. Check appropriate documentation of you desirable SDK.
Look at Admin UI in Endpoint profiles menu.
Get via Admin REST API .
Please, check profiling section.
I think it will help you to find your desired information.

How to use Twitter User Streams

I am new in Twitter API. I have a requirement like I have to pull the information of an authenticated twitter user to know the number of followers. I can do this using REST API but I have a problem here. So I have taken the way to use Twitter User Streams.
I am not able to integrate this functionality in the site. I am using twitter console( https://dev.twitter.com/console ). But there I am not able to get any kind of result, it actually hangs/shows gateway timeout. And that's for I am not able to configure that how to write the code for this or how to use this in site. I am not passing any kind of parameters.
So, any body can please help in this would be very grateful( a clean sample code for this or any link where to get the good documentation ). I have already checked with twitter dev documentations.
Thanks in advance :)

How to track more than 400 keywords using Twitter Stream API?

The question is simply the title.
Please don't tell me to go for a Twitter Data reseller like Gnip or Datasift as they're so expensive.
Thank you.
Run more than one twitter stream, there is no other way around to solve this issue. For running multiple streamer basically you need a dedicated twitter user, ip address and registered application for each streamer.

How to deal with Twitter API Limits?

I have this project that's based on a Twitter Bot. NOT an abusive or spammer bot. Just a robot that will reply with information about my system when it's mentioned.
The thing is: I expect to have about 3000 mentions/hour. Which means I have to send about 3000 replies/hour.
I know Twitter API calls are limited to 350/h when the app is authenticated and 150/h when it's not. But I've also read about it being 1000/h somewhere in the Twitter Discussion boards.
Anyway, how can I deal with having to send so many replies/hour?
I thought about creating multiple Twitter accounts and delegating some of the replies to them in order to being able to reply to all of them, but I do realize it's not a pretty solution.
Does anyone have a better idea?
Your best bet is to use Streaming.
Connecting
API Params (JSON)
Basically, you open up a connection with their server with your credentials and instead of reading the return stream and closing, you just keep reading. When you want to make a request, you just send another header or something.

Twitter API - check if username exists

I just want to check if a username exists in Twitter. I thought it would be part of the API, but cannot find it on the api wiki http://apiwiki.twitter.com/w/page/22554679/Twitter-API-Documentation.
Any ideas?
thanks
JP
It seems that I can pass screenname in the user search API. And I have to check for 404 not found status (if username does not exist). Seems a bit ugly, but might just work. Better suggestions welcome!
this gives 404:
http://api.twitter.com/1/users/show.xml?screen_name=thisdoesnotexist1234abxfd
this returns valid info:
http://api.twitter.com/1/users/show.xml?screen_name=billgates
thanks
JP
EDIT
The Twitter REST API v1 is no longer active. Please migrate to API
v1.1. https://dev.twitter.com/docs/api/1.1/overview.
#JP Even if the twitter api rate limit has been reached , 404 would be returned. SO this is as you said a dirty method. take into consideration the rate limit and add sufficient checks in your code so as not to reach them. the above method should work fine.
regards,

Resources