diff --git a/README.md b/README.md index 8fcc818..359812b 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ If `$_GET['code']` is set on this page it assumes it came from Buffer and will a Once we've got an `access_token` set the `$buffer->ok` property will read true. It is false by default. Now that we've received access we are free to run queries against Buffer endpoints! Below we pull the list of profiles associated with the logged in buffer user and submit a test update to each one. +##Post an update with a simple text if (!$buffer->ok) { echo 'Connect to Buffer!'; } else { @@ -62,6 +63,26 @@ Now that we've received access we are free to run queries against Buffer endpoin } } +##Post an update with a link + $buffer->go('/updates/create', + array( + 'text' => 'My first status update with a link worked!', + 'media[link]'=> $link, + 'media[description]'=> 'your description', + 'profile_ids[]' => $profile->id, + )); + +##Post an update with an image + $buffer->go('/updates/create', + array( + 'text' => 'My first status update with an image worked!', + 'media[picture]'=> $url_image, + 'media[thumbnail]'=> $url_thumbnail, + 'profile_ids[]' => $profile->id, + )); + +Please also note that you'll need the media[picture] and media[thumbnail] to make it work + # Storage Right now this baby just stores the `access_token` in `$_SESSION['oauth']['buffer']['access_token']`. If you are doing something serious with this you should probably rewrite the `store_access_token()` and `retrieve_access_token()` methods.