apistatusesupdate.php

Summary
apistatusesupdate.php
APIStatusesUpdatePost a notice (update your status) through the API

APIStatusesUpdate

Post a notice (update your status) through the API

postActiv

the micro-blogging software

Copyright

Copyright © 2016-2017, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

Post a notice (update your status) through the API

Updates the authenticating user’s status.  Requires the status parameter specified below.  Request must be a POST.

URL pattern

  • /api/statuses/update.:format

Formats

  • xml
  • json

HTTP Method

  • POST

Requires Authentication

Yes

  • status - (Required) The URL-encoded text of the status update.
  • source - (Optional) The source application name, if using HTTP authentication or an anonymous OAuth consumer.
  • in_reply_to_status_id - (Optional) The ID of an existing status that the update is in reply to.
  • lat - (Optional) The latitude the status refers to.
  • long - (Optional) The longitude the status refers to.
  • media - (Optional) a media upload, such as an image or movie file.

Usage notes

  • The URL pattern is relative to the @ref apiroot.
  • If the @e source parameter is not supplied the source of the status will default to ‘api’.  When authenticated via a registered OAuth application, the application’s registered name and URL will always override the source parameter.
  • The XML response uses <a href=”url target=”http://georss.org/Main_Page” name=”http://georss.org/Main_Page””>GeoRSS</a> to encode the latitude and longitude (see example response below <georss:point>).
  • Data uploaded via the @e media parameter should be multipart/form-data encoded.

Example usage

curl -u username:password http://example.com/api/statuses/update.xml -d status=’Howdy!’  -d lat=’30.468’ -d long=’-94.743’

Example response

<?xml version=”1.0” encoding=”UTF-8”?> <status> <text>Howdy!</text> <truncated>false</truncated> <created_at>Tue Mar 30 23:28:05 +0000 2010</created_at> <in_reply_to_status_id/> <source>api</source> <id>26668724</id> <in_reply_to_user_id/> <in_reply_to_screen_name/> <geo xmlns:georss=”url target=”http://www.georss.org/georss” name=”http://www.georss.org/georss””> <georss:point>30.468 -94.743</georss:point> </geo> <favorited>false</favorited> <user> <id>25803</id> <name>Jed Sanders</name> <screen_name>jedsanders</screen_name> <location>Hoop and Holler, Texas</location> <description>I like to think of myself as America’s Favorite.</description> <profile_image_url>url target=”http://avatar.example.com/25803-48-20080924200604.png” name=”http://avatar.example.com/25803-48-20080924200604.png”</profile_image_url> <url>url target=”http://jedsanders.net” name=”http://jedsanders.net”</url> <protected>false</protected> <followers_count>5</followers_count> <profile_background_color/> <profile_text_color/> <profile_link_color/> <profile_sidebar_fill_color/> <profile_sidebar_border_color/> <friends_count>2</friends_count> <created_at>Wed Sep 24 20:04:00 +0000 2008</created_at> <favourites_count>0</favourites_count> <utc_offset>0</utc_offset> <time_zone>UTC</time_zone> <profile_background_image_url/> <profile_background_tile>false</profile_background_tile> <statuses_count>70</statuses_count> <following>true</following> <notifications>true</notifications> </user> </status>

PHP version

Tested with PHP 7.0

File Authors

@author Zach Copley @author Evan Prodromou @author Robin Millette ro.nosp@m.bin@millet.nosp@m.te.info @author Siebrand Mazeland s.maz.nosp@m.eland@xs4a.nosp@m.ll.nl @author Brion Vibber br.nosp@m.ion@pobo.nosp@m.x.com @author Craig Andrews cand.nosp@m.rews@integral.nosp@m.blue.com @author Jean Baptiste Favre stat.nosp@m.usnet@jbfav.nosp@m.re.org @author Mikael Nordfeldth m.nosp@m.mn@hetha.nosp@m.ne.se @author Maiyannah Bishop maiyanna.nosp@m.h.bishop@postac.nosp@m.tiv.com

Web