src/facebook/facebookalbuminterface.cpp
bool FacebookAlbumInterface::uploadPhoto(const QUrl &source, const QString &message)
{
// <<< uploadPhoto
    Q_D(FacebookAlbumInterface);
    // XXX TODO: privacy parameter?

    QVariantMap extraData; // image upload is handled specially by the facebook adapter.
    extraData.insert("isImageUpload", true);

    QVariantMap postData;
    postData.insert("source", source);
    if (!message.isEmpty())
        postData.insert("message", message);

    bool requestMade = d->request(IdentifiableContentItemInterfacePrivate::Post,
                                  identifier(), QLatin1String("photos"),
                                  QStringList(), postData, extraData);

    if (!requestMade)
        return false;

    d->action = FacebookInterfacePrivate::UploadPhotoAction;
    d->connectFinishedAndErrors();
    return true;
// >>> uploadPhoto
}
/*!
    \qmlmethod bool FacebookAlbum::uploadPhoto(const QUrl &source, const QString &message)
    Initiates a "post photo" operation on the album.  The photo will
    be loaded from the local filesystem and uploaded to Facebook with
    its caption set to the given \a message.
    
    If the network request was started successfully, the function
    will return true and the status of the album will change to
    \c SocialNetwork::Busy.  Otherwise, the function will return
    false.
    
    Once the network request completes, the \c responseReceived()
    signal will be emitted.  The \c data parameter of the signal
    will contain the \c id of the newly uploaded photo.
    */
\qmlmethod bool FacebookAlbum::uploadPhoto(const QUrl &source, const QString &message)
Initiates a "post photo" operation on the album.  The photo will
be loaded from the local filesystem and uploaded to Facebook with
its caption set to the given \a message.

If the network request was started successfully, the function
will return true and the status of the album will change to
\c SocialNetwork::Busy.  Otherwise, the function will return
false.

Once the network request completes, the \c responseReceived()
signal will be emitted.  The \c data parameter of the signal
will contain the \c id of the newly uploaded photo.
\ qmlmethod bool FacebookAlbum :: uploadPhoto ( const QUrl &source const QString &message ) Initiates a " post photo " operation on the album . The photo will be loaded from the local filesystem and uploaded to Facebook with its caption set to the given \ a message . If the network request was started successfully the function will return true and the status of the album will change to \ c SocialNetwork :: Busy . Otherwise the function will return false . Once the network request completes the \ c responseReceived () signal will be emitted . The \ c data parameter of the signal will contain the \ c id of the newly uploaded photo .
bool FacebookAlbumInterface::uploadPhoto(const QUrl &source, const QString &message)
{
    Q_D(FacebookAlbumInterface);
    QVariantMap extraData; 
    extraData.insert("isImageUpload", true);
    QVariantMap postData;
    postData.insert("source", source);
    if (!message.isEmpty())
        postData.insert("message", message);
    bool requestMade = d->request(IdentifiableContentItemInterfacePrivate::Post,
                                  identifier(), QLatin1String("photos"),
                                  QStringList(), postData, extraData);
    if (!requestMade)
        return false;
    d->action = FacebookInterfacePrivate::UploadPhotoAction;
    d->connectFinishedAndErrors();
    return true;
}
bool FacebookAlbumInterface :: uploadPhoto ( const QUrl & source , const QString & message ) { Q_D ( FacebookAlbumInterface ) ; QVariantMap extraData ; extraData . insert ( " " , true ) ; QVariantMap postData ; postData . insert ( " " , source ) ; if ( ! message . isEmpty ( ) ) postData . insert ( " " , message ) ; bool requestMade = d -> request ( IdentifiableContentItemInterfacePrivate :: Post , identifier ( ) , QLatin1String ( " " ) , QStringList ( ) , postData , extraData ) ; if ( ! requestMade ) return false ; d -> action = FacebookInterfacePrivate :: UploadPhotoAction ; d -> connectFinishedAndErrors ( ) ; return true ; }
\qmlmethod bool FacebookAlbum::uploadPhoto(const QUrl &source, const QString &message)
Initiates a "post photo" operation on the album.
\ qmlmethod bool FacebookAlbum :: uploadPhoto ( const QUrl &source const QString &message ) Initiates a " post photo " operation on the album .
// <<< uploadPhoto // XXX TODO: privacy parameter? // image upload is handled specially by the facebook adapter. // >>> uploadPhoto