src/facebook/facebookphotointerface.cpp
/*!
    \qmlmethod bool FacebookPhoto::untagUser(const QString &userId)
    Initiates a "delete tag" operation on the tag which tags the
    user specified by the given \a userId into the photo.
    
    If the network request was started successfully, the function
    will return true and the status of the photo will change to
    \c SocialNetwork::Busy.  Otherwise, the function will return
    false.*/
\qmlmethod bool FacebookPhoto::untagUser(const QString &userId)
Initiates a "delete tag" operation on the tag which tags the
user specified by the given \a userId into the photo.

If the network request was started successfully, the function
will return true and the status of the photo will change to
\c SocialNetwork::Busy.  Otherwise, the function will return
false.
\ qmlmethod bool FacebookPhoto :: untagUser ( const QString &userId ) Initiates a " delete tag " operation on the tag which tags the user specified by the given \ a userId into the photo . If the network request was started successfully the function will return true and the status of the photo will change to \ c SocialNetwork :: Busy . Otherwise the function will return false .
bool FacebookPhotoInterface::untagUser(const QString &userId)
{
    Q_D(FacebookPhotoInterface);
    QVariantMap extraData;
    extraData.insert("to", userId);
    int tempPendingTagToRemoveIndex = -1;
    for (int i = 0; i < d->tags.count(); ++i) {
        QString tagUserIdentifier = d->tags.at(i)->userIdentifier();
        if (!tagUserIdentifier.isEmpty() && tagUserIdentifier == userId) {
            tempPendingTagToRemoveIndex = i;
            break;
        }
    }
    if (tempPendingTagToRemoveIndex == -1)
        qWarning() << Q_FUNC_INFO << "Unknown tag specified for removal";
    bool requestMade = d->request(IdentifiableContentItemInterfacePrivate::Delete,
                                  identifier(), QLatin1String("tags"),
                                  QStringList(), QVariantMap(), extraData);
    if (!requestMade)
        return false;
    d->action = FacebookInterfacePrivate::DeleteTagAction;
    d->pendingTagToRemoveIndex = tempPendingTagToRemoveIndex;
    d->connectFinishedAndErrors();
    return true;
}
bool FacebookPhotoInterface :: untagUser ( const QString & userId ) { Q_D ( FacebookPhotoInterface ) ; QVariantMap extraData ; extraData . insert ( " " , userId ) ; int tempPendingTagToRemoveIndex = -1 ; for ( int i = 0 ; i < d -> tags . count ( ) ; ++ i ) { QString tagUserIdentifier = d -> tags . at ( i ) -> userIdentifier ( ) ; if ( ! tagUserIdentifier . isEmpty ( ) && tagUserIdentifier == userId ) { tempPendingTagToRemoveIndex = i ; break ; } } if ( tempPendingTagToRemoveIndex == -1 ) qWarning ( ) << Q_FUNC_INFO << " " ; bool requestMade = d -> request ( IdentifiableContentItemInterfacePrivate :: Delete , identifier ( ) , QLatin1String ( " " ) , QStringList ( ) , QVariantMap ( ) , extraData ) ; if ( ! requestMade ) return false ; d -> action = FacebookInterfacePrivate :: DeleteTagAction ; d -> pendingTagToRemoveIndex = tempPendingTagToRemoveIndex ; d -> connectFinishedAndErrors ( ) ; return true ; }
\qmlmethod bool FacebookPhoto::untagUser(const QString &userId)
Initiates a "delete tag" operation on the tag which tags the
user specified by the given \a userId into the photo.
\ qmlmethod bool FacebookPhoto :: untagUser ( const QString &userId ) Initiates a " delete tag " operation on the tag which tags the user specified by the given \ a userId into the photo .
// <<< untagUser // try to find which tag will be removed if it succeeds // possible that it's ok to not exist, since we might be out of sync with reality. // >>> untagUser