Play with twitter API and post "via your application" without have to code anything
If you are a twitter user , then you should familiar about twitter apps . With the Open API , developers can make their application with customized application name such as : "Tweetdeck" , "Snaptu" , "Seesmic" ,"UberTwitter" etc. For some cases , yes we have to code *hard code* to communicate with twitter via our application to make it easier to do many task that twitter can do. But , i just found an easy and fun way to do those "communication" things.
Steps :
- Make an application for your twitter here : http://twitter.com/apps/new
- Go to here http://dev.twitter.com/console , this is your playground
- Read API documentation here at http://apiwiki.twitter.com
- Get some fun
Example :
We will post a status update with Geo Location information attached and also a reply to friend's status
1. Login to http://twitter.com
2. go to http://dev.twitter.com/console
3. choose statuses/update and POST ( see the documentation )
4. in the API documentation we know that there are 6 parameters that can be used in statuses/update :
- status. Required. The text of your status update. URL encode as necessary. Statuses over 140 characters will cause a 403 error to be returned from the API. Statuses have the same text as a recently posted status from the same user will also cause a 403 error to be returned from the API. When a 403 is returned due to shortened text or duplicate statuses, the response body will contain details on why the tweet was rejected.
- in_reply_to_status_id. Optional. The ID of an existing status that the update is in reply to.
- Note: This parameter will be ignored unless the author of the tweet this parameter references is mentioned within the status text. Therefore, you must include @username, where username is the author of the referenced tweet, within the update.
- lat. Optional. The location's latitude that this tweet refers to. The valid ranges for latitude is -90.0 to +90.0 (North is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding long parameter with this tweet.
- long. Optional. The location's longitude that this tweet refers to. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter with this tweet.
- place_id. Optional. The place to attach to this status update. Valid place_ids can be found by querying geo/reverse_geocode.
- display_coordinates. Optional. By default, geo-tweets will have their coordinates exposed in the status object (to remain backwards compatible with existing API applications). To turn off the display of the precise latitude and longitude (but keep the contextual location information), pass display_coordinates=false on the status update.
status parameter is Required and others are Optional
5. insert the parameter(s) you want ( for lat and long , you have to activate the "Add a location to your tweets" in your twitter setting page ) and choose wich application name you wanna use.
6 . Click "Send" , and see what happen.