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
Developer
Sumitava_Datta
Posts: 83
Registered: ‎02-18-2013
My Device: Blackberry 10

Re: Twitter integration in blackberry 10 cascades application

[ Edited ]

Hi 

I have some problem. When I call below function ...

 

void TwitterApi::getAccess()
{
connect(oauthManager, SIGNAL(temporaryTokenReceived(QString,QString)), this, SLOT(onTemporaryTokenReceived(QString, QString)));
connect(oauthManager, SIGNAL(authorizationReceived(QString,QString)), this, SLOT( onAuthorizationReceived(QString, QString)));
connect(oauthManager, SIGNAL(accessTokenReceived(QString,QString)), this, SLOT(onAccessTokenReceived(QString,QString)));
connect(oauthManager, SIGNAL(requestReady(QByteArray)), this, SLOT(onRequestReady(QByteArray)));

oauthRequest->initRequest(KQOAuthRequest::TemporaryCredentials, QUrl("https://api.twitter.com/oauth/request_token"));
oauthRequest->setConsumerKey(CONSUMER_KEY);
oauthRequest->setConsumerSecretKey(CONSUMER_SECRET);
oauthManager->setHandleUserAuthorization(true);
oauthManager->executeRequest(oauthRequest);
}

 

after that onTemporaryTokenReceived SLOT is call ...

 

void TwitterApi::smileysurprised:nTemporaryTokenReceived(QString token, QString tokenSecret)
{
qDebug() << "Temporary token received: " << token << tokenSecret;

QUrl userAuthURL("https://api.twitter.com/oauth/authorize");

if( oauthManager->lastError() == KQOAuthManager::NoError) {
qDebug() << "Asking for user's permission to access protected resources. Opening URL: " << userAuthURL;
QUrl openUrl = oauthManager->getUserAuthorization(userAuthURL);
emit urlReady(openUrl);
}

}

 

after call getUserAuthorization function but onAuthorizationReceived SLOT function not call

 

void TwitterApi::smileysurprised:nAuthorizationReceived(QString token, QString verifier) {
qDebug() << "User authorization received: " << token << verifier;

oauthManager->getUserAccessTokens(QUrl("https://api.twitter.com/oauth/access_token"));
if( oauthManager->lastError() != KQOAuthManager::NoError) {
emit loginComplete(false);
}
}

 

That's why callBackURL just open. I can,t understand what I do please help me...

Developer
Sumitava_Datta
Posts: 83
Registered: ‎02-18-2013
My Device: Blackberry 10

Re: Twitter integration in blackberry 10 cascades application

I am using QNX® Momentics® IDE for BlackBerry® 10 Native SDK , Version: 10.2.1.

Please can any one tell me why this github project not run in device or simulator?

https://github.com/kylefowler/twitter-bb10

After build when click on run configuration -> select Target ->Apply but run option is inactive.

 

Developer
Sumitava_Datta
Posts: 83
Registered: ‎02-18-2013
My Device: Blackberry 10

Re: Twitter integration in blackberry 10 cascades application

Hi guys I am still waiting for your valuable reply....

Developer
Sumitava_Datta
Posts: 83
Registered: ‎02-18-2013
My Device: Blackberry 10

Re: Twitter integration in blackberry 10 cascades application

Hi simon_hain

 

Can you please tell me how to implement twitter API in Blackberry 10 cascades application?I am trying to implement but I get some issue on that. I am using the below link OAuth code

https://github.com/kylefowler/twitter-bb10/tree/master/src

 

 

Developer
CapQNX
Posts: 119
Registered: ‎01-11-2013
My Device: BlackBerry z10

Re: Twitter integration in blackberry 10 cascades application

I am also facing some issues using this Twitter-bb10 ..  

 

Is there any other API ?