Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Contributor
Posts: 28
Registered: ‎07-04-2013
My Device: BB, 86ABC
My Carrier: IDEA

How to remove Json tags in Facebook sahring Framework window

Hi,

 

I used following code to share text in Facebook/Twitter. When i send the text "Hello" to Facebook?Twitter framework then it's showing text as ' :json:{"":"Hello"} ' in the sharing window as well sharing the same to the Facebook. I need to show the text as "Hello" only in the window. Please help me.

 

 

Thanks in advance.

 

bb::system::InvokeManager manager; // = new bb::system::InvokeManager(this);
        bb::system::InvokeRequest request;

        request.setTarget("Twitter");

        request.setAction("bb.action.SHARE");

        request.setMimeType("text/plain");

        QVariantMap data;

        Qt::CaseSensitivity cs = Qt::CaseInsensitive;
        QString strData = text->replace("<html>", "", cs).replace("</html>", "", cs).replace("<br />", "", cs);

        data[""] = strData;

        QVariantMap moreData;
        moreData[""] = data;
        bool ok;
        request.setData(bb:Smiley TonguepsObject::encode(moreData, &ok));

        bb::system::InvokeTargetReply *reply = manager.invoke(request);
        if (reply) {
            m_errorMessage = tr("Invoke Success");

            QObject::connect(reply, SIGNAL(finished()), NULL,
                    SLOT(processInvokeReply(targetReply)));
        } else {
            m_errorMessage = Constants::no_Network_Available;
            showErrorDialog();
        
        }