views:

19

answers:

1

I have

$facebook->api_client->status_set('is the Eagle has landed.','');

as part of a test page, and i get errors

Call to undefined method FacebookRestClient::status_set()

please help, thank you

A: 

Did you even bother opening up the file and looking at the available methods?

Copy/pasted from the SDK

  /**
   * Sets the users' current status message. Message does NOT contain the
   * word "is" , so make sure to include a verb.
   *
   * Example: setStatus("is loving the API!")
   * will produce the status "Luke is loving the API!"
   *
   * @param string $status                text-only message to set
   * @param int    $uid                   user to set for (defaults to the
   *                                      logged-in user)
   * @param bool   $clear                 whether or not to clear the status,
   *                                      instead of setting it
   * @param bool   $status_includes_verb  if true, the word "is" will *not* be
   *                                      prepended to the status message
   *
   * @return boolean
   */
  public function &users_setStatus($status,
                                   $uid = null,
                                   $clear = false,
                                   $status_includes_verb = true) {

So, in usage

$facebook->api_client->users_setStatus( $status, $uid, $clear, $status_includes_verb );
Peter Bailey
i have checked that before, and users_setStatus isn;t working. That is why i asked here. the status isn't posted on facebook.
ajayprabhu
Well, i promise you this: no matter what type of errors you're getting from an established method call, you'll **never** fix them by just randomly choosing a new method name.
Peter Bailey
its from wiki facebook developer api my first code, i guess they don't randomly post in wiki right?
ajayprabhu