zMobyPicturePlugin - 1.0.1

Mobypicture API client and tools packaged as symfony plugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source

zMobyPicture plugin

The zMobyPicturePlugin is a symfony plugin that provides client for API ( To call any of API methods developer key is needed. You can get it from

Basic Usage

  • Create client instance. You need to get developer key first to call any API method.

    $client = new zMobyPictureClient('myKeyGotFromMobyPicture');
  • Check whether the user is a valid Mobypicture user

    $response = $client->checkCredentials('myUser', '1234', zMobyPictureClient::FORMAT_PLAIN);
  • Get information about the posting

    $response = $client->getMediaInfo('57glx6', zMobyPictureClient::FORMAT_XML);
  • Get thumbnail URL

    $response = $client->getThumbUrl('57glx6', zMobyPictureClient::SIZE_THUMBNAIL, zMobyPictureClient::FORMAT_XML);
  • Post media. You can use two variations of post media methods - postMedia and postMediaUrl. First one simply returns whether call was succesful. The later returns tinyurl of the post on Mobypicture. It doesn't matter which format is set. Method always returns plain text.

    $response = $client->postMedia('/home/kuba/myImage.png', 'myUser', '1234');
    $response = $client->postMediaUrl('/home/kuba/anotherImage.png', 'myUser', '1234');
    $response = $client->postMediaUrl(
        'title'       => 'Test XML',
        'description' => 'Testing MobyPicture API client in PHP',
        'tags'        => 'test,php,symfony,api',
        'location'    => '54.317024,18.568354',
        'hashtags'    => '#020',
        'services'    => 'none,+twitter'

Format types

All the client methods take response format type as the last parameter.

  • Plain

  • Json

  • XML