X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doc%2Fapi.md;h=a3ca4d244d9b8c05ed26f9388817ae3e73a07e05;hb=00395118f92f54994ab1764e9c7254bd5152e84e;hp=a4ea985778870049a7e7eb614fec561897eb431d;hpb=e1ba53fec3391e40565e0c7c88a23cb6dae3dc4e;p=friendica.git diff --git a/doc/api.md b/doc/api.md index a4ea985778..a3ca4d244d 100644 --- a/doc/api.md +++ b/doc/api.md @@ -20,9 +20,7 @@ Using an invalid method results in HTTP error 405 "Method Not Allowed". ### Authentication -Friendica supports basic HTTP Auth and OAuth 1 to authenticate the user to the APIs. - -OAuth settings can be added by the user in web UI under [/settings/oauth/](/settings/oauth/). +Friendica supports basic HTTP Auth and OAuth to authenticate the user to the APIs. ### Errors @@ -70,8 +68,8 @@ xml: The [RSStoFriendika](https://github.com/pafcu/RSStoFriendika) code can be used as an example of how to use the API with python. The lines for posting are located at [line 21](https://github.com/pafcu/RSStoFriendika/blob/master/RSStoFriendika.py#L21) and following. -def tweet(server, message, group_allow=None): +def tweet(server, message, circle_allow=None): url = server + '/api/statuses/update' -urllib2.urlopen(url, urllib.urlencode({'status': message,'group_allow[]':group_allow}, doseq=True)) +urllib2.urlopen(url, urllib.urlencode({'status': message, 'circle_allow[]': circle_allow}, doseq=True)) There is also a [module for python 3](https://bitbucket.org/tobiasd/python-friendica) for using the API.